Chris Lilley

Results 620 comments of Chris Lilley

In firefox and in chrome they display as 32x8, 8x8, 32x32 and 8x32 ie their actual pixel widths and heights from 'IHDR'. The 'pHYs' makes no difference at all.

> And how often does it occur in the wild? I don't have data, except to observe that any chunk that goes beyond the bare minimum to display an image...

This is a good question, and perhaps the specification could be clarified to make finding the answer more obvious. However, a little digging clarified the issue and [13.1 Error handling](https://w3c.github.io/PNG-spec/#13Decoders.Errors)...

A bit of testing reveals: **pngcheck** gives an error and stops ``` chris@SuperNomad:/mnt/c/Users/chris/Documents/PNG$ pngcheck -vv invalid-unknown-ancillary.png zlib warning: different version (expected 1.2.13, using 1.3) File: invalid-unknown-ancillary.png (263 bytes) chunk IHDR...

@tnikkel great. I'm working on a WPT that uses this file (and a copy with the invalid chunk deleted, as the reference)

I see Mozilla [Ignore "invalid chunk type" errors in pngs if we have enough data to display something when encountered.](https://hg.mozilla.org/mozilla-central/rev/553d0d707d9d)

[wpt results for recovery from unknown and invalid ancillary chunk](https://wpt.fyi/results/png/errors?label=experimental&label=master&aligned) On 29 Feb 2024: Chrome 124 and Edge 123 pass, Firefox 125 and Safari TP 189 fail.

@ProgramMax could you review https://github.com/web-platform-tests/wpt/pull/44936 please? It is the same as the other error-recovery test, but the invalid ancillary chunk is after `IDAT`.

> It is the same as the other error-recovery test, but the invalid ancillary chunk is after `IDAT`. [WPT results](https://wpt.fyi/results/png/errors?label=experimental&label=master&aligned) show interop on error recovery for ancillary chunks after `IDAT`.

Looking at [11.3.5.3 pHYs Physical pixel dimensions](https://www.w3.org/TR/2003/REC-PNG-20031110/#11pHYs) I suspect this comment has misunderstood the use of `pHYs`. It is not primarily used to specify resolution (such as "300 dpi") but...