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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

uploads: Convert CMYK to RGB when saving avatar/realm icon as png. #8559

Closed
wants to merge 1 commit into from

Conversation

shubham-padia
Copy link
Member

@shubham-padia shubham-padia commented Mar 2, 2018

Fixes #8546.
PNG does not support CMYK mode. CMYK file is converted to RGB and
then saved as PNG.

see: python-pillow/Pillow#1380

The file used for testing is obtained from wikipedia, so there are no copyright concerns.
I tried converting the zulip logo used in test images, but converting to CMYK increases the image size by a lot ( >2MB ), i tried many solutions (using ImageMagick and Gimp) but couldn't reduce the size of the converted file.

Converted the zulip logo to cmyk with ImageMagick 馃帀

@timabbott Please review.

@zulipbot
Copy link
Member

zulipbot commented Mar 2, 2018

Hello @zulip/server-dependencies, @zulip/server-misc members, this pull request was labeled with the area: dependencies, area: uploads labels, so you may want to check it out!

Fixes zulip#8546.
PNG does not support CMYK mode. CMYK file is converted to RGB and
then saved as PNG.
@timabbott
Copy link
Sponsor Member

Nice, merged, thanks @shubham-padia!

@timabbott timabbott closed this Mar 2, 2018
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