Announcement

  •  » Engine
  •  » Dealing with color profiles

#1 2015-03-31 09:34:33

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Dealing with color profiles

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

 

#2 2015-03-31 09:46:18

rvelices
Piwigo Team
2005-12-29
1960

Re: Dealing with color profiles

I might be wrong, but I thought web browsers cannot display correctly AdobeRGB images ... Maybe it changed ...

Offline

 

#3 2015-03-31 09:54:58

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Dealing with color profiles

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

 

#4 2015-03-31 10:15:48

rvelices
Piwigo Team
2005-12-29
1960

Re: Dealing with color profiles

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

 

#5 2015-03-31 10:21:31

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Dealing with color profiles

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

 

#6 2015-04-01 21:40:37

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13541

Re: Dealing with color profiles

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

 

#7 2015-04-02 01:22:09

alloyphoto
Member
alloyphoto.com
2010-11-09
157

Re: Dealing with color profiles

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

 

#8 2016-03-17 22:03:46

fcoiffie
Member
1970-01-01
15

Re: Dealing with color profiles

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

 
  •  » Engine
  •  » Dealing with color profiles

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2022 · Contact