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

Anthony Walter sysrpl at gmail.com
Fri May 10 04:10:39 CEST 2019


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.

https://bugs.freepascal.org/view.php?id=35553

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190509/605a0871/attachment.html>


More information about the lazarus mailing list