What's wrong with this picture?

Hi,
I’m trying to use glreadpixels to save an image, but something is wrong with bpp or pixelformat or something else. My images are “brownish”. Trial and error has not worked well. If I change the parameters of the pixelformatdescriptor, then ChoosePixelFormat fails. If I change bpp to something besides 4, then the image becomes distorted.

my pixelformatdescriptor is currently

pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.iLayerType=PFD_MAIN_PLANE;
pfd.cColorBits=32;
pfd.cDepthBits      = 24;
pfd.cStencilBits    = 8;

How might I get the first brownish image to look like the correct, second image?

Thanks!

Reverse red and blue components.
Something like RGBA versus BGRA.

That was it! I had a typo where I used GL_BGRA instead of GL_RGBA;
Thanks!