Some time ago I asked a question about saving hwnd into ppm file. Thanks to a stackoverflow user I have solved my issue. Iy's work correctly but I still have a problem: the red and blue color are inverted.
the code and my previous question where here: hwnd to ppm issue
Here is the bitmap info data:
bi.biSize = sizeof(BITMAPINFOHEADER);
bi.biWidth = w;
bi.biHeight = -h;
bi.biPlanes = 1;
bi.biBitCount = 24;
bi.biCompression = BI_RGB;
bi.biSizeImage = 0;
bi.biXPelsPerMeter = 0;
bi.biYPelsPerMeter = 0;
bi.biClrUsed = 0;
bi.biClrImportant = 0;
I googled and it seems the problem is BI_RGB, and I should use BI_BITFIELDS ... but I didn't find documentation on how to use it. And I really don't want to read all data pixel by pixel in order to revert blue and red color. Is there any way to get it done without doing it pixel by pixel ?
thanks in advance for your help