Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2019-05

Bug: TPortableNetworkGraphic deson't work correclty on gtk2 Linux

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Anthony Walter

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>

Reply by email