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

Use sRGB Color Profile when converting images #4064

Merged
merged 1 commit into from Mar 8, 2016
Merged

Use sRGB Color Profile when converting images #4064

merged 1 commit into from Mar 8, 2016

Conversation

darix
Copy link
Contributor

@darix darix commented Mar 7, 2016

With the conversion done when uploading or fetching an image we also
lose any embedded color profiles. This leads to images possibly not rendered
properly in the browsers.
To fix the issue we tell imagemagick to render
the image from the embedded color profile to sRGB, which is the color
space used by most browsers.

RT_sRGB.icm is taken from the RawTherapee repository and is licensed as Public Domain.

With the conversion done when uploading or fetching an image we also
lose any embedded color profiles. [This leads to images possibly not rendered
properly in the browsers.][1] To fix the issue we tell imagemagick to render
the image from the embedded color profile to sRGB, which is the color
space used by most browsers.

RT_sRGB.icm is taken from the [RawTherapee repository][2] and is licensed as Public Domain.

[1]: https://meta.discourse.org/t/image-embedded-color-profile/40519
[2]: https://github.com/Beep6581/RawTherapee/blob/master/rtdata/iccprofiles/output/RT_sRGB.icm
@discoursebot
Copy link

You've signed the CLA, darix. Thank you! This pull request is ready for review.

@coding-horror
Copy link
Contributor

👍 looks good, but how risky is this change? It is referencing a local file, will that file be present? @ZogStriP ?

@darix

This comment was marked as off-topic.

@ZogStriP
Copy link
Member

ZogStriP commented Mar 7, 2016

How is that different from using the -colorspace sRGB option?

@patdavid
Copy link
Contributor

patdavid commented Mar 7, 2016

@ZogStriP the -colorspace sRGB option is a rough conversion and not really appropriate for high quality image conversions (per im docs + forums)

@patdavid
Copy link
Contributor

patdavid commented Mar 7, 2016

If:

  • the image has an embedded colorspace, this will convert it to sRGB (appropriate for browser viewing safely).
  • the image does not have an embedded colorspace, it's highly likely to be sRGB and thus this conversion will have no effect.
  • the image does not have an embedded colorspace, but it was supposed to, then it will be obvious to the poster that their colors are off and to fix the problem... :)

ZogStriP added a commit that referenced this pull request Mar 8, 2016
Use sRGB Color Profile when converting images
@ZogStriP ZogStriP merged commit 712b7af into discourse:master Mar 8, 2016
@ZogStriP
Copy link
Member

ZogStriP commented Mar 8, 2016

Let's try it. 👍

@darix

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants