The typical answer when someone has colors problem is to use sRGB color profile to ensure proper display on all browser after PHP GD stripped all metadata.
While I'm personally ok with that I think there is room for improvements.
Particularly I found this https://github.com/slavicv/jpeg-icc
It's a PHP class which allow to extract ICC profile from a JPEG file and inject it back in another file, it can also be used to simply detect the profile used.
So I think a good scenario would be :
- we use GD
- resize the image
- extract ICC profile from original file
- write ICC profile in the resized image
- we use IM
- extract ICC profile
- resize image by providing the ICC data (there is parameter/method for that)
additionally we can add a advanced parameter "default_icc_profile" when extraction goes wrong
Offline
I might be wrong, but I thought web browsers cannot display correctly AdobeRGB images ... Maybe it changed ...
Offline
I don't know if there is full support but there is obviously a difference between tagged and untagged photos
[Forum, topic 25354] Color management error
Offline
mistic100 wrote:
I don't know if there is full support but there is obviously a difference between tagged and untagged photos
[Forum, topic 25354] Color management error
yes: the photo with white background is on browser with no color probile, the one with gray background with color profile is probably in lightroom (?) which handles profiles
Offline
sorry you are wrong :) both photos are viewed in the browser
http://piwigo.org/forum/postgallery.php … _Wrong.JPG is the resized one
http://piwigo.org/forum/postgallery.php … iginal.JPG is the original one viewed in lightbox (see the subtle Admin Tools button on top-right)
Offline
Hello :-)
Color profile is a recurring issue. Every day I see users adding photos with non-sRGB profile :-/
My experience tought me:
1) with non-sRGB photos, the colors are different depending on the web browser.
2) with non-sRGB photos, if you remove the metadata from file (which is the case with small derivatives, see $conf['derivatives_strip_metadata_threshold']) the colors are altered, even with web browsers displaying correctly the colors on big derivatives.
As you said in introduction mistic100, my only advice for now is to say "always convert to sRGB for web publishing". Considering my (1), I don't think we can simply fix the problem by keeping the color profile in the derivative, but if we keep the color profile (as metadata) we avoid the problem of altered colors on square/thumbnail/XXS for web browser able to render color profiles.
Offline
As far as Lightroom export/publishing is concerned, there are two distinct cases:
1. When you use JPEG or TIFF as the export format, Lightroom always renders images from sources in your catalog. My plugin is configured to apply sRGB to rendered images. So, no issues here.
2. When you use ORIGINAL as the export format and your catalog photos are already JPEGs or TIFFs, Lightroom exports them as is, without any rendering or conversion. This is where you can run into issues if catalog files have a different color profile assigned (AdobeRGB or ProPhoto).
Offline
I added the following line in my config.inc.php and now, my photos are correctly displayed in Firefox (with the "Color management" profile) :
$conf['derivatives_strip_metadata_threshold'] = 65536;
Offline