Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed decoding grayscale jpegs with exotic sampling factors #1979

Merged
merged 3 commits into from
Feb 6, 2022

Conversation

br3aker
Copy link
Contributor

@br3aker br3aker commented Feb 6, 2022

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

Fixes #1978. Issue author didn't respond (yet) whether we can use attached image in the test suite so I've created a test image based on one of grayscale images from the test suit:

before

This image after decode-encode on current master:

after

@br3aker
Copy link
Contributor Author

br3aker commented Feb 6, 2022

@antonfirsov we've got a permission to use provided image in test suite, do we need extra image or one is enough?

@br3aker br3aker changed the title Dp/jpeg grayscale fix Fixed decoding grayscale jpegs with exotic sampling factors Feb 6, 2022
@JimBobSquarePants
Copy link
Member

Great work @br3aker ! I don't think we'll need two references if the sampling factors are the same for both.

@JimBobSquarePants JimBobSquarePants added this to the 2.0.0 milestone Feb 6, 2022
Copy link
Member

@JimBobSquarePants JimBobSquarePants left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed the sampling factors are identical so I believe this to be good to go.

@JimBobSquarePants JimBobSquarePants merged commit 6d434ea into SixLabors:master Feb 6, 2022
@br3aker br3aker deleted the dp/jpeg-grayscale-fix branch February 6, 2022 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some old jpg images are saved with glitches (regression in alpha)
2 participants