GD lack of color management workaround

Several posts on this forum over the past years have mentioned that resized photos lose their embedded color profile, because GD doesn't support color management and strips the embedded profile.

This will result suboptimal display even in some browsers that do support color management, because they don't assume sRGB when no profile is embedded. I think the current release of Firefox 3 does assume sRGB if management is turned on, but Safari doesn't.

I realize that this is not a ZP bug, but with increasing awareness of and support for color management it will be an issue for more and more ZP users. At least for me it is an issue, because most visitors of my website are either photographers or clients in the publishing business.

I just came across a blog post that suggests it's possible to re-embed the sRGB profile using ImageMagick after the GD manipulations, if I understand correctly.

I guess it's not a very elegant solution, but if it would be possible to implement this in Zephoto, this would be a welcome workaround to me, and perhaps many other users.

Comments

  • acrylian Administrator, Developer
    Sound a little weird to use ImageMagick to "repair" GD processed images. Better would be to use ImageMagick in the first place if your server support it (if not this is of no help anyway naturally).

    Since we have Imagick/ImageMagick support now, did you try that?
  • Joris Member
    That sounds good.

    I didn't realize it was supported. Your troubleshooting guide still appears to mention it isn't.

    Thanks.
  • acrylian Administrator, Developer
    But the 1.3 release post and our feature list do...;-) We probably forgot to update the troubleshooting. I am not sure exactly how Imagick handles too big images though. I guess it will have limits as well. (this support was thankfully done by a user).
  • BTW. You are not correct about browser's default. All will assume sRGB unless otherwise notified. (Most will just assume sRGB without any check.)
  • Joris Member
    @sbillard:

    To the best of my knowledge, all mainstream browsers, except those based on WebKit, will by default assume the display profile (i.e. there is no color management), whether there is a profile embedded or not.

    Safari 4 does not assume sRGB when it is not embedded. Firefox 3 does, but only when color management is turned on (by default it's turned off).
  • acrylian Administrator, Developer
    The general "rule" is to use sRGB on the web because older browsers do not support them. It's actually an old rule: http://www.w3.org/Graphics/Color/sRGB.html

    To my knowledge Safari is the only major browser that has color management enabled by default (since v3 if I remember right).
  • Joris Member
    You are most right, but what I meant to explain is that sRGB is not normally the display profile; I think sbillard is confusing sRGB with the display profile.
  • acrylian Administrator, Developer
    I don't think that he does...:-) sRGB has proofed to be the best for web images if browsers has no color management (besides that color management is a annoying beast in general...;-)) And of course the display might have another profile (as does the scanner, printer or camera etc).
  • Joris Member
    Hence even photos which are converted to sRGB will not be displayed with good color fidelity in Safari when the embedded profile is lost.

    Which is why I'm very happy with Imagick support :).
  • Hello,

    If I understand correctly, imagick now has the ability to leave ICC profile embedded in an image. Though, the thumbnails of my images are stripped off (or not provided with) the Adobe RGB profile, which the full images have.

    Full size images are rendered with the colors I intended (I am using Firefox).

    imagick is enabled and here is its info as provided my Zenphoto:

    Graphics support: PHP Imagick library 2.2.2
    ImageMagick 6.4.8 2009-12-31 Q16 OpenMP http://www.imagemagick.org

    Is there anything else that needs to be turned on/enabled for thumbnails to have color profile?

    Thanks!
  • I've opened a ticket for this: http://www.zenphoto.org/trac/ticket/1575

    It's simple to copy profiles with Imagick, but there may need to be a small core change first.
Sign In or Register to comment.