Add tests for validating output colors when doing cmyk to cmyk conversion with embedded profiles #4096
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.
As discussed in #4045, this PR:
Adds a test to validate output colors when doing CMYK to CMYK colourspace transformations with embedded profiles using perceptual intent (the current default). This test might be updated in the future if the default intent changes to
relative
instead ofperceptual
, or if an optional parameter is provided to select the preferred intent for CMYK transformations.Moves the
negate
operation to the bottom of the pipeline, preventing colourspace transformations to be applied to already negated image data resulting in output colors being incorrect.Adds a test that validates (2) by asserting similarity with expected color values when negating in combination with a CMYK colourspace transformation.
Currently, all tests pass except for
negate (png, trans)
. This seems related to premultiplication of the alpha channel as commenting out theresize
operation of the test results in the test passing.@lovell I'm happy to implement any changes to ensure the test passes. Can you give me some pointers on how to tackle negating in combination with premultiplication of the alpha channel if present?