Just for fun I'm writing an #ILBM impl. for #Qt (QImageIOPlugin). I'm having trouble with the PCHG chunk. Any #Amiga dev/hobbyist here who might have a clue what's wrong? My code:
parsing: https://github.com/panzi/qilbm/blob/4222c4bdf5b81ab67fc68b3647ca231d1685d53a/src/ILBM.cpp#L865-L1097
rendering: https://github.com/panzi/qilbm/blob/4222c4bdf5b81ab67fc68b3647ca231d1685d53a/src/ILBM.cpp#L1297-L1346
sample file: https://sembiance.com/fileFormatSamples/image/iffILBM/pchgcmp.iff
Other impl. I've looked at and can't finde the difference to:
https://aminet.net/package/dev/misc/PCHGLib14 (includes 2 images that *do* work)
https://fossies.org/linux/netpbm/converter/ppm/ilbmtoppm.c line 1596 and onward, which is used by #ImageMagick. #RetroComputing
qilbm/src/ILBM.cpp at 4222c4bdf5b81ab67fc68b3647ca231d1685d53a · panzi/qilbm

QImageIO Plugin to read and display ILBM files. Contribute to panzi/qilbm development by creating an account on GitHub.

GitHub
I don't know if my bug is in the Huffman decompression of the color palettes or the rendering. I don't think it is in the parsing/decompression of the BODY chunk, since that works for all other ILBM files that I've found.