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

CMYK PSD files should copy alpha #3918

Merged

Conversation

jasonbaumeister
Copy link
Contributor

Description

During the CMYK to RGB conversion in PSDInput, the alpha channel was never copied to the RGBA output. Converting a PSD to JPEG worked because it ignored all the 0 alpha values, but converting to WebP would result in a fully transparent image.

Tests

I added a cmyk-with-alpha.psd test to the psd-colormodes test to check this

Checklist:

  • I have read the contribution guidelines.
  • If this is more extensive than a small change to existing code, I
    have previously submitted a Contributor License Agreement
    (individual, and if there is any way my
    employers might think my programming belongs to them, then also
    corporate).
  • I have updated the documentation, if applicable.
  • I have ensured that the change is tested somewhere in the testsuite
    (adding new test cases if necessary).
  • My code follows the prevailing code style of this project.

@lgritz
Copy link
Collaborator

lgritz commented Jul 22, 2023

Need the DCO sign-off on these commits as well.

@jasonbaumeister jasonbaumeister force-pushed the cmyk_psd_fix branch 2 times, most recently from 91b40d2 to cfac1c0 Compare July 22, 2023 01:19
@jasonbaumeister
Copy link
Contributor Author

Need the DCO sign-off on these commits as well.

Should all be squashed and signed now.

adding a test

Signed-off-by: Jason Baumeister <[email protected]>
Copy link
Collaborator

@lgritz lgritz left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@lgritz lgritz merged commit 88d354e into AcademySoftwareFoundation:master Jul 22, 2023
22 of 23 checks passed
lgritz pushed a commit to lgritz/OpenImageIO that referenced this pull request Jul 29, 2023
…#3918)

During the CMYK to RGB conversion in PSDInput, the alpha channel was
never copied to the RGBA output. Converting a PSD to JPEG worked because
it ignored all the 0 alpha values, but converting to WebP would result
in a fully transparent image.

I added a cmyk-with-alpha.psd test to the psd-colormodes test to check
this

Signed-off-by: Jason Baumeister <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants