[Lazarus] Bug: TPortableNetworkGraphic deson't work correclty on gtk2 Linux
Can someone take a look at this bug? There are two issues here.
1) The ScanLine property of a 32 bpp TPortableNetworkGraphic misbehaves if the image width falls into some arbitrary values. It looks like the pixel stride isn't an even 32 bits. Pixels stride on a 32 bpp should always be 32 bits be regardless of image width. In my tests a 300 pixel wide image fails this test while a 400 pixel wide image succeeds. This problem does not present itself on Windows.
2) Occasionally, and without any discernible pattern, the red and blue components of 32 bpp png images are reversed by TPortableNetworkGraphic. This has nothing to do with the ScanLine property. Sometime simply loading a 32 bpp png with TPortableNetworkGraphic and drawing it on a Canvas shows a resulting image with red and blue components reversed.