I'm using this code:
It's fully working, but red is displayed as green.Code:for (imageidx = 0; imageidx < bmpinfo->biSizeImage; imageidx+=1)
{
swaprgb = bmpimage[imageidx];
bmpimage[imageidx] = bmpimage[imageidx + 1];
bmpimage[imageidx + 1] = swaprgb;
}