PNGenc icon indicating copy to clipboard operation
PNGenc copied to clipboard

Random error with IDAT data lenght

Open Raphael-Boichot opened this issue 3 months ago • 4 comments

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 :

0000553 0000554

Do you have an idea of what could be the issue ?

Raphaël

Raphael-Boichot avatar Nov 21 '24 22:11 Raphael-Boichot