I put all my photos in the sRGB color space before I upload them. Typically, this is considered the best move to be most compatible with all browsers. The full-size images look good on all of the following:
-color-dumb browsers (meaning everything except Safari and FireFox w/ color management on)
-average monitors (meaning monitors that mostly live in the sRGB gamut)
-good monitors (meaning monitors calibrated to color spaces larger than sRGB)
I've noticed, however, that when images are resized or processed in some way via ZP, that the color profile is dropped. This is mostly a problem on good monitors since no longer can calibrate the image properly.
Is there any way to maintain the color space on an image when it is processed in ZP? If not, is there another work-around?
Thanks in advance.
Comments
When I create the JPGs, they are in the sRGB color space. I understand that is the web standard. (And in LightRoom, for example, I don't think it is possible to export images without any color space.)
In any case, the color space seems to be maintained when viewing the full-size images, but not when the images are processed. So for the re-sized images, the colors are bad on a good monitor. For example, the thumbnail of an image differs (color-wise) from the full-size version.
--
I suppose another line of questioning would simply be:
In terms of color space, what SHOULD I do with the images before I upload them?
Zenphoto makes no manipulation of the pixel values. What you have in is what you get out. I do not know why you would have a problem with the resized images. I am not seeing this on my system. Of course, for thumbnails, there are much fewer pixels and that may impact the appearance. Subtle colors may take many pixels to represent. If the resize removes some of those pixels then the colors may look different.
`http://www.stanats.com/testingsite/colorspace.htm`
If you look at that in Safari on the Mac, on a good monitor, then there is a significant color difference. In non-color-space-aware browsers, there is no difference. There is also no difference in Firefox, either with color management on or off, which is somewhat confusing to me since that SHOULD be the same as Safari if FF's color management is turned on.
Perhaps I am not understanding something fully. Thoughts/advice?
And for my edification, I'll repeat my previous question: when you prepare your photos for upload, do you use the sRGB color space or do you use no color space at all?
I actually post from both Macs and PCs. In the past, Safari was the only color-space-aware browser, so it made sense for people to use it on the PC solely for that reason. Now, however, FF3 has caught up.
I'll wait to see if Acrylian has any ideas.
On the other hand, the photo in cache folder is missing the header information, I think it is better to kept them.
A good check is to use the "export for web" in Photoshop (or how it is named in english, have the German version). If the preview image in that function is missing saturation and colors then something probably must have went wrong as to my knowledge this function drops any profles from the file at all, too.
I understand that this can be painful if you take really lots of photos but it seems the most secure for me (well, I don't take photos myself).
I am actualy not used to the image processor functions in detail but I found a forum thread about gdlib and color changes. That mentions that the `imagecopyresize()` function often results in wrong colors and recommends to use `imagecopyresampled()` as that is more accurate. We probably need to check which one we use (the latter one is GD2 but I guess that should really be widely in usel, shouldn't it).
Also you can check if you want to convert to sRGB and/or include ICC-color profiles. But basically stripping out all these data that is not needed for "pure dissplay" is what makes image filesize significantly smaller with this feature.
Without the color profile, it is unable to know what is the color profile using on Safari...
That said, if GD just ignores it, then I'm not sure if there is anything to do about it.
Is there any progress on Acrylian's comment above about using `imagecopyresampled()` instead of `imagecopyresize()`? I'm assuming this has to be handled by the programmers instead of individual users.
but i do know for a fact that the problem does exist, and i don't think i can do anything to change it, so i guess i'm probably stuck with it until somebody starts writing code that actually deals with color spaces instead of just ignoring them.
i don't know anything about GD or tinyMCE, so i have no idea how to do anything else about the "chain." let me know if i'm missing something or if there's some research i could do that would help.
thanks.
The problem is actually not related to resizing or resampling. It only occurs on watermarked images!
I believe this is actually a serious problem, at least for those of us planning to showcase their work to a potentially paying audience. The images simply do not look good enough. Anybody on a Mac (or with a color-space-aware browser) may reproduce the issue and see the difference within two minutes:
1. Download a watermarked image to the desktop
2. Open it in Preview and open the inspector (cmd-I)
3. You will see that the color model is RGB (of course), but the Color-Sync-Profile is empty ("-")
4. Go to "Tools-Assign Profile" and select an sRGB-Profile from the drop-down-list...
5. ...the colors pop-up
NB: Assigning a profile does not change the "pixels", it only writes the profile to the jpeg-header.
The bottom line is that the watermarking-routine drops the color-space information that was initially in the jpeg-header of the uploaded image. If watermarking is turned off, everything is fine.
Here's an example image in case you want to see it yourself:
http://www.andreasbrandl.ch/Namibia/NAM-20091005-06-42-12.jpg
BTW: Although this issues is a bit annoying , ZP is awesome...
Cheers, Andreas
It is recommend to work with images in sRGB mode always if they are supposed to be on the web and do not use the "export to web" function of Adobe programs as that removes the profile, too (but that is surely no news to you).
The only workaround for you would be currently. To use the full image instead of the sized image on the image.php page. Of course you will then have to resize the images manually before uploading and loose a benefit of using zp...
Sorry, but this is nothing we can change as the GDlib is not done by us and installed on your server anyway. We hope to get Imagick graphic libary support in the future (a user is thankfully working on that) which is said to support color profiles.
btw, you might also want to upgrade to the current Zenphoto version (I do not recall if anything has been changed on the image processing)
Thanks for the quick response. I understand that there is nothing you guys can do about it as long as the libraries used do not support that, i.e. drop the color space.
BTW, I have to admit that my initial statement was not quite right. Indeed, the issue occurs with watermarked as well as with resized/resampled images...
Cheers, and keep up the great work...
Andreas
PS: Still looking forward to a new library with color space support ;-)
Moral of the story: use SRGB!