Closed kornelski closed 3 years ago
Thanks for the report. Seems like the fault is on weezl
here for any bit width smaller than 8
.
I'm right now even fearing that we are facing miscompilation. Adding dbg!()
to some statements or even just recompiling with a different compiler version seems to influence the output while the debugging code shows the exact same codes being encoded. There is no unsafe
code anywhere.
Encoding of large-ish images results in GIF images that look broken.
For example re-encoding of this image:
gives this file:
(Firefox refuses to render it. Chrome and macOS render only 20-something lines and garbage pixels.)
It's easy to reproduce with the example code. I've verified using another codebase that it's a bug in the GIF encoder, not the reader. The bug is in v0.11. It's not in v0.10.