The attached program loads 3 images with FreeImage:
photoshop-red.bmp and gimp-red.png are consistent and have pixel values in the expected RGBA order (ff00007f)
- but
gimp-red.bmp's pixels are in the wrong order: GBAR (00007fff)
Here's how I created the images:
- Launch GIMP 2.8.16
- Create a new image, 3x1 pixels, Advanced > Fill with Transparency
- Zoom in
- Select the pencil tool, Opacity 100, Pixel brush, size 1, Dynamics > Fade length 0
- Select color solid red (255,0,0)
- Click on the rightmost pixel
- Select Opacity 50
- Click on the center pixel — there should now be a 3-step alpha gradient: 0%, 50%, 100%
- File > Export As > BMP, Advanced > 32 bits > A8 R8 G8 B8, click Export —
gimp-red.bmp
- File > Export As > PNG, click Export —
gimp-red.png
- Open the BMP in Photoshop, and re-save it as another BMP file —
photoshop-red.bmp
The attached
gimp-red.bmpis not PNG compressed, according to its header, but BITFIELDS.At the moment FreeImage aborts loading, as only jpeng and png compressed BMPs are supported.