-
-
Notifications
You must be signed in to change notification settings - Fork 64
Add support for saving CMYK images #554
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
base: master
Are you sure you want to change the base?
Conversation
|
Hi, thank you so much for starting this! We are certainly interested in integrating this, and we would like you to encourage to write some tests. It is possible this will turn out harder than it should be. Let us know if you get blocked, then we can try to sort this out. The "hyphenation" change in baseContext.py seems out of place. We would prefer a separate PR for that. |
|
Any progress on this please? Saving CMYK images would be very useful. @justvanrossum If tests are the blocking issue here I can try writing those if you could elaborate on what those should be 🙏 |
|
You never responded to the hyphenation feedback: what does that have to do with this PR? There are test scripts in |
|
@chrisjansky, I'm glad you find this PR useful. I must admit that I forgot about this PR, and a year has passed 😄. Let me see if I can add the test this week! @justvanrossum, thanks for the pointers. I will remove the hyphenation, which is totally unrelated. |
drawBot/context/imageContext.py
Outdated
| colorSpaceName=colorSpaceName, | ||
| ) | ||
|
|
||
| if "imageColorSyncProfileData" in options: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this instead be handled by the _makeBitmapImageRep() helper function, with an additional keyword argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this is also handled by line 174: imageData = imageRep.representationUsingType_properties_(self._saveImageFileTypes[ext], properties).
I added this because it initially didn't work as expected, but it now does.
I needed to export TIFF images with CMYK. Even though I was setting
imageColorSyncProfileDatawith macOS's Generic CMYK profile, the final output file did not have the colour profile set, and the encoded colours were in the RGB space.I would happily invest more time and add tests if this PR looks valuable for the project!
This PR is related to #284 and #531.