Rounding bug in Nona and/or image reading

18 views
Skip to first unread message

Monkey

unread,
Jan 11, 2021, 7:14:15 AM1/11/21
to hugin and other free panoramic software

The attached project consists or two images - small, ostensibly single-colour JPEGs.

When opened in Photoshop, green.jpg has pixels all of value (0,255,1). yellow.jpg has pixels all of value (255,255,0).

After stiching to separate tifs, one tif is over 10x larger than the other. On opening in Photoshop this can be seen to be the result of the pixels being a mixture of (0,255,1) and (0,255,2), and as such, not being very compressible with LZW - unlike the other tif, which is still pure (255,255,0).

This suggests a bug in Nona's resampling code which is causing some values to round up - either that or a bug (or maybe just a difference from Photoshop) in the code that decompresses the JPEG? Maybe the second is more likely, because changing Nona's interpolator makes no difference.

Anyway, it's probably more of academic interest really, since such images are not common in real usage, but I thought it would be of interest.

David
nona bug.zip
Reply all
Reply to author
Forward
0 new messages