[squeak-dev] PNGReadWriter buglet

tim Rowledge tim at rowledge.org
Sun Feb 26 02:10:54 UTC 2023

> On 2023-02-25, at 4:33 PM, tim Rowledge <tim at rowledge.org> wrote:
> Both the tExt & sRGB are legitimate according to the standard but I doubt this can be the source of my current problem if an old 2.8 image can load the image properly.

Hmph. The standard 'suggests' that if a sRGB chunk is present (which it is in my problem images) then one should ignore the gAMA chunk, which we don't, except that we do nothing with it anyway. Like the pHYs chunk my image has, apparently. 

Right now the decoded image looks very like the last pass of the interlaced data is simply not dealt with and we end up with the almost-good result. Digging into the actual pixels we seem to end up with
row 1: alternating0 & sensible pixel value
row 2: sensible pixels values
row 3: alternating etc etc

Looking at https://www.w3.org/TR/png/#4Concepts.EncodingScanlineAbs it seems to me that the common issue here might be the pixels shown as being dealt with in pass 6; see the 8 by 8 pattern grid they show. Maybe?

tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Computers are only human.

More information about the Squeak-dev mailing list