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

Add support for decoding tiff images with CieLab color space #2127

Merged
merged 11 commits into from
Jul 18, 2022

Conversation

brianpopow
Copy link
Collaborator

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

This PR adds support for decoding Tiff images with the CieLab color space.

Sorry, something went wrong.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@brianpopow brianpopow requested a review from a team May 31, 2022 19:14
where TPixel : unmanaged, IPixel<TPixel>
{
// Note: The image from MagickReferenceDecoder does not look right, maybe we are doing something wrong
// converting the pixel data from Magick.NET to our format with CieLab?
Copy link
Member

Choose a reason for hiding this comment

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

What's happening here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The image Tiff\CieLab.tiff looks wrong when using the MagickReferenceDecoder:
output

It should look like this:
expected

ImageMagick itself can decode this image just fine, that's why I thought we maybe doing something wrong in MagickReferenceDecoder.

Copy link
Member

Choose a reason for hiding this comment

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

Ah right.... Yep,

IMagickImage<T> contains ColorSpace enum which we are blindly ignoring when converting. I always assumed they did the same as us and converted color spaces on decode.

It looks like we should be checking that first and converting on the fly.

@dlemstra Am I correct here?

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.

Just checked the ref vs input. Looks great! 👍 Nice work!

@JimBobSquarePants JimBobSquarePants merged commit 29320a6 into main Jul 18, 2022
@JimBobSquarePants JimBobSquarePants deleted the bp/cielab branch July 18, 2022 00:38
@JimBobSquarePants JimBobSquarePants added this to the 3.0.0 milestone Jul 18, 2022
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.

None yet

3 participants