[Lazarus] Bug: TPortableNetworkGraphic deson't work correclty on gtk2 Linux

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Bug: TPortableNetworkGraphic deson't work correclty on gtk2 Linux

Free Pascal - Lazarus mailing list
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.


Your feedback would be appreciated. It's a bit concerning when I am teaching kids how to program using Lazarus and Linux and a bug like this presents itself during a class.

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus