Permalink
Browse files

core: Use sRGB as the standard colorspace for images on the web.

We might need to check whether older imagemagick versions (<6.7.6)
still display the images correctly:

http://www.imagemagick.org/discourse-server/viewtopic.php?f=2&t=20501
  • Loading branch information...
1 parent b385788 commit aa366c33127923971c98eea947ba8a2aadce637b @arjan arjan committed Nov 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/support/z_media_preview.erl
@@ -159,7 +159,7 @@ cmd_args(FileProps, Filters, OutMime) ->
{correct_orientation, Orientation},
{resize, ResizeWidth, ResizeHeight, is_enabled(upscale, Filters)},
{crop, CropArgs},
- {colorspace, "RGB"} | Filters1],
+ {colorspace, "sRGB"} | Filters1],
Filters3 = case {CropArgs,is_enabled(extent, Filters)} of
{none,true} -> Filters2 ++ [{extent, ReqWidth, ReqHeight}];
_ -> Filters2

6 comments on commit aa366c3

Owner

kaos replied Nov 13, 2012

I can check on a system with:
kaos@morpheus:~$ convert --version
Version: ImageMagick 6.3.4 06/06/12 Q16 http://www.imagemagick.org

Owner

arjan replied Nov 13, 2012

I also checked on IM 6.6 and it looks good there. Please check with the "welcome.jpg" image from zotonic; it should not be darkened.

convert -colorspace sRGB -resize 500x500 welcome.jpg  foo.jpg
Owner

kaos replied Nov 13, 2012

Looks good to me.

Owner

kaos replied Dec 12, 2012

hmm.. that was offline, running it via zotonic and a browser, the picture got some weird colors.

Owner

kaos replied Dec 12, 2012

From the thread linked to in the commit message:

Can one of you tell me at what release the switch occurred, so that I can put a version switch in my scripts.

6.7.5-5.

Owner

arjan replied Dec 12, 2012

Yes I linked to that comment :-P

Please sign in to comment.