I try to put an image from GIMP into an embedded system using export. The c file created has a struct with width, height, bytes per pixel (bpp) and the data of the image. The total length is width*height*bbp+1. The bpp in default to 4 by GIMP. I has tried but fail to find an explanation of how the data is arranged. Can someone point me a direction?
In the very low level of pixel by pixel write to the display controller, one usually repeat image pixel height lines, and each line would have width/8 bytes times the bpp. Thus a 48x32 image, would have 24 bytes for each line and there are 32 lines. I try this rule but the image does not seem come out right.
A 4-bytes bpp seems to indicated that the there are 4G (256*256*256*256) color but most embedded display can only do 64K color (256*256), I found a function by web search to convert 4 bytes to 2 bytes but not sure the formula would be correct? Is there an authoritative answer to this?
Any help is appreciated.