vstroebel / jpeg-encoder

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

Progressive scan creates distorted image for widths 180 and 360 #2

Closed RobertLabonte closed 2 years ago

RobertLabonte commented 2 years ago

This is a great library! I found an issue when providing images with a width of 360 or 180 when progressive_scan is set to true. Issue goes away when progressive_scan is set to false.

Input is RGB and encoder quality is set to 85.

Image from Big Buck Bunny showing the distortion. test

RobertLabonte commented 2 years ago

It looks like Chrome doesn't display the image. Click on the invisible link to get the URL of the image.

vstroebel commented 2 years ago

This is most likely a problem with subsampling. I've created #3 this should fix this problems. Would be nice if you can test if this PR fixes the Problem for your test image, too.

RobertLabonte commented 2 years ago

It's fixed. Thank you! test