add withIcc command to override input file ICC profile #550
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a
withIcc()
command which overrides the input ICC profile.I think the unit test is not quite sufficient, as the difference between the colorspace transformed image and the original input image are very subtle (the RGB values differ by 1 or 2 in most cases) with the ICC profile I'm using.
fixtures.assertSimilar()
will miss the difference if no transform occurred. TheBluish.icc
file was taken from the lcms project via colord. I wonder if there's an ICC profile that would create a more dramatic difference? I hesitate to do something like anassert.strictEqual()
on a couple of pixels of the image, as different systems might have different rounding errors during the colorspace conversion.