Please note that even after applying this patch, the
generated base64 data is not really RFC2045 compliant
(the base64 alphabet in the RFC starts with "A", not
with "0"), but at least should be coherent between
sngc.c and sngd.c.
How do you reproduce it? I took the spiderman.png from the original bug report, convered it to a sng, and then that back to a png. Yeah, the png was different (likely due to better compression), but the actual content is identical (according to "gm compare"). I then converted the new png again to an sng -- the two sng files are identical.
patch
A pity I didn't see this before, would have saved me some work... On the plus side, I also added a fix for this to my sng fork, see https://github.com/fingolfin/sng/tree/modern-libpng
Max, I just tested with your 1.1.0 changes merged and this bug still seems to be present.
How do you reproduce it? I took the spiderman.png from the original bug report, convered it to a sng, and then that back to a png. Yeah, the png was different (likely due to better compression), but the actual content is identical (according to "gm compare"). I then converted the new png again to an sng -- the two sng files are identical.
Can this be closed now?