Of course make sure your raw file has the same format as OpenGL expects it. This means that if you give OpenGL the data as RGB 8bit, then your raw file should have RGB pixels (interleaved format) in 8bits. This means 1byte per channel the following order:
1 byte red, 1 byte green, 1 byte blue, 1 byte red, 1 byte green, 1 byte blue, 1 byte red, 1 byte green, 1 byte blue, 1 byte red, 1 byte green, 1 byte blue, ...
...
1 byte red, 1 byte green, 1 byte blue, 1 byte red, 1 byte green, 1 byte blue, 1 byte red, 1 byte green, 1 byte blue
ordering pixels from top to bottom or bottom to top, or right to left, etc does not make a difference since you can change that very easily with OpenGL. Just order the pixels in a way that makes it easy for you to understand/compute U/V coordinates for your texture. Personally I prefer left to right, top to bottom. More logical to me. It's a question of taste.
Before you jump into daisy-chaining conversions etc, try to update your texxture with the contents of a buffer in memory. Once you have done that, go to the conversion step. In order to simplify debugging, try with some stupid patern that you can understand, such as a gradient, a 1-pixel black & white checkerboard, etc. Make sure this works and then try with a picture.
The reason I'm saying this it's because OpenGL is a state machine. If you do not set your state correctly before your draw/paint, then the results may not be the ones you have expected.
So make sure the basics work first.