Willem van Schaik’s PngSuite is a most welcome set of PNG test images.
Mysteriously, it has no test images that have a non-zero scanline filter and a bit depth of < 8.
I give you f99n0g04.png:

It uses a different scanline filter on successive lines, cycling round them all.
This is a useful test-case to have because the scanline filtering works at the byte level. Normally, when filtering, a byte from one pixel is compared to a byte from the previous pixel, but when the bit depth is < 8 there are several pixels per byte. So instead, the previous byte is used (which will comprise several of the earlier pixels, not necessarily even the immediately preceding one). So you can imagine getting some of the previous-byte/previous-pixel logic wrong. Basically it’s a special case, and the PngSuite doesn’t cover it.
Of course, the only PNG decoder I’ve found that barfs on this image, is PyPNG (a pure Python PNG decoder). And it only broke whilst I was in the middle of implementing small bit depth decoding.
[2009-02-24: Willem added this image to PngSuite]
2009-02-24 at 16:14:02
Cool!! Good addition to PngSuite….
2009-02-24 at 22:32:25
See:
http://svn.browsershots.org/trunk/pypng/lib/png.py
(I used it in glChess)
2009-02-25 at 08:19:28
@Willem: Glad you like it.
2009-02-25 at 08:20:29
@Robert: Yes. That’s the png.py that I have been busy modifying to work with bit depth < 8 and other sundry extras.