PNGenc
PNGenc copied to clipboard
Random error with IDAT data lenght
Hello.
First thanks a lot for your fancy library !
I encounter a strange bug on Raspberry Pi Pico when using PNGenc (same with two unrelated codes). I try to convert a bunch of BMP files to PNG on an SD card. It works perfectly about 75% of the time, but I have errors for some files (always the same) where the Idata size reported by PNGenc does not match the compressed data lenght checked with https://www.nayuki.io/page/png-file-chunk-inspector. There is no obvious pattern, I still have plenty of free ram (like 150k+). I used the addLine method with PNG_PIXEL_INDEXED, getLastError() always returns 0 even with the bad files.
Here are a bad file (553) and a good one (554) from the same batch :
Do you have an idea of what could be the issue ?
Raphaël