slyrus / opticl

An image processing library for Common Lisp
Other
182 stars 35 forks source link

image doesn't round-trip #14

Closed csrhodes closed 7 years ago

csrhodes commented 7 years ago

Hi,

I'm not sure what's going on, but:

(opticl:write-png-file "/tmp/tetris2.png" (opticl:read-png-file "/tmp/tetris.png"))

produces an output image which is substantially different from the input image, which you can find at http://www.dangermouse.net/esoteric/piet/tetris.png. I think there's a problem with reading, but I'm not sure where.

slyrus commented 7 years ago

Hmm... Looks to me like we're getting bad data back from png-read.

slyrus commented 7 years ago

The first column is OK, but starting with the second column things go haywire.

slyrus commented 7 years ago

A bug in ramarren's png-read code. See https://github.com/Ramarren/png-read/pull/7 for the fix.

slyrus commented 7 years ago

Will close this when ramarren merges the pull-request.

csrhodes commented 7 years ago

Lovely. Thank you.

slyrus commented 7 years ago

Thank you! This bug has been here a long time and I think I've run across it from time to time. This underscores the need for a more complete test suite for opticl.

slyrus commented 7 years ago

This is fixed in the latest png-read https://github.com/Ramarren/png-read/pull/7. Thanks again for the report!