vstroebel / jpeg-encoder

JPEG encoder written in Rust
Apache License 2.0
21 stars 4 forks source link

Invalid encoding #4

Closed sug0 closed 2 years ago

sug0 commented 2 years ago

Using jpeg-encoder v0.5.0, I get the following picture:

green circle

Which should have been a red circle. To reproduce this, I am using the following code:

https://git.sr.ht/~sugo/feim/tree/jpeg-bug/item/examples/encode.rs

In turn, this code is calling into your library to perform the actual encoding:

https://git.sr.ht/~sugo/feim/tree/jpeg-bug/item/src/image/jpeg/mod.rs#L167

Could this be some logic error in my code, or is there an issue with the encoding process in your end? If I switch the output format from jpeg to, for instance, farbfeld, this program works as expected.

vstroebel commented 2 years ago

This was a bug in the encoder. I've released 0.5.1 that should fix this.

sug0 commented 2 years ago

Thank you! :)