Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
sHagen
Topic Author
Posts: 19
Joined: 13 Aug 2016, 19:02

Color space problems...

01 Feb 2017, 04:05

Hello,

I run a gallery here: https://www.stefanhagen-fotografie.de

In the thumbnail view, everything looks alright. When you click on a picture it often gets desaturated. The color is noticeably different than in the thumbnail.

I have tracked this down to the following conditions:
* It happens in Chrome and Firefox (not in Internet Explorer)
* It happens when the "full size link" points to the picture directly, without the /render/ in the path.

For example check this picture:
Thumbnail: https://www.stefanhagen-fotografie.de/r ... e_0015.jpg (saturated)
Full size Link: https://www.stefanhagen-fotografie.de/c ... e_0015.jpg (desaturated)

You can check the Exif data by pasting the links to http://exifdata.com

This is what I think happens:
The imagevue resizer gets active when the /render/ is in the path. The resizer throws away the exif data, so every browser shows the image in the standard/native color space.

If /render/ is not in the path, the original picture is served to the client. The picture has the sRGB color space defined. Chrome and Firefox are interpreting a picture with sRGB differently than a picture without any colorspace definition. Therefore the difference.

One more thing...
I have noticed that "some" full size images are also resized using the imagevue renderer. What is the condition for this? Does this happen when I check the "resize" option when uploading?

I want to file this as a bug, because I think it should work consistently. Either the color-space of the thumbnail should match the color-space of the original. Or the color space of the original should be adapted.

Any thoughts on this? Am I the only one with this problem?

Best Regards,
Stefan
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Color space problems...

01 Feb 2017, 05:48

Before I answer this in depth, please can you tell me, did you use the panel upload-resizer when uploading your images? Or do you resize your images yourself before upload? I want to exclude this factor, because it does not use the same resize-methods as the X3 internal resize-mechanism ... When resizing-on-upload, the images are in fact resized on the client through javascript.

Apart from the above factor, I can immediately tell you, X3 is not doing anything to your original images. The image that displays here https://www.stefanhagen-fotografie.de/c ... e_0019.jpg, is IDENTICAL to the same full size image that displays in the X3 popup window: https://www.stefanhagen-fotografie.de/? ... deine-0019. So this, which you refer to as "desaturated", must be the way you want them to display for the visitor. 
sHagen wrote:This is what I think happens:
The imagevue resizer gets active when the /render/ is in the path. The resizer throws away the exif data, so every browser shows the image in the standard/native color space.
I have never seen or heard this reported before, but once I know more, I can diagnose further.
sHagen wrote:One more thing...
I have noticed that "some" full size images are also resized using the imagevue renderer. What is the condition for this?
This is entirely logical, and something we spent a lot of time optimizing with X3. If your original image is 1600px (or larger), and the visitor is on a 1024px screen, then why load the original? X3 will load a 1024px version, which is often half the file-size and consumes much less memory. Of course, there are mobile devices also, which will wish to load smaller images also for the POPUP ... Add another factor: modern RETINA devices (mobiles), and also new laptops like macbook pro, which have "double pixel density", and will want to load larger (up to 2x) images. There are other factors also: landscape vs portrait ... If you are viewing from a desktop screen, it is obvious that you will be able to display a much larger LANDSCAPE image than you will for a PORTRAIT image ... The portrait image is limited to the height of your screen, and thus will be much smaller, and thus often served a resized image instead of original. All handled by X3, but I can't explain all the math logic to you here.
sHagen wrote:Does this happen when I check the "resize" option when uploading?
No. The upload resizer option simply resizes images on upload from the panel. You should never upload massive images to the web (say 3000px +), because 1) Filesize will be massive, 2) Will take too long to download for visitor, 3) consumes too much memory for browsers, and 4) web hosts will fail to create resized versions because. Thus, all uploaded originals should be within reasonable size 1280px - 2000px ... You should either do this locally prior to upload (if you are concerned about resize quality), or use the upload resize.
 
User avatar
sHagen
Topic Author
Posts: 19
Joined: 13 Aug 2016, 19:02

Re: Color space problems...

01 Feb 2017, 09:02

Usually I export a web-version, which is 2048x2048 max in width and height. Facebook plays best with that.

In imagevue I did *not* use the upload resizer.

One further thing I noticed is that portrait size images are handled differently. Lets use these two images: I have uploaded both images at the same time with no resize option set. The first one is 1600px high, the second one is 1600px wide.

Now look at those pictures on the front page. If you expand the first one and check the source, you see that the full size path of the image is: 
"/render/w800-q90/1.index/LenaBertan_0003.jpg"

Look at the second picture and you will see that the URL goes to the full size image:
"/content/1.index/LenaBertan_0015.jpg"

I would imagine that X3 is trying to not deliver too big images and will resize them if the image does not fit in the screen in full resolution. My resolution here is 1920x1080. This would explain why a 1600px wide image is shown in the original resolution, but a 1600px high one is being resized.

I think this is a good thing to do on the X3 side.

So it would boil down to:
- The original image is displayed differently in my browser than the files that got resized by X3.

But there must be more to it. I have downloaded this picture:
https://www.stefanhagen-fotografie.de/c ... n_0015.jpg

Then I have uploaded it to X3 again with the resize option checked and a height/width of 1500x1500 to make sure it actually gets resized. The result is this image:
https://www.stefanhagen-fotografie.de/c ... X3test.jpg

Now it got even more desaturized.

I will play with this at home and try to make more sense out of it...

Thanks for looking into it.

Best Regards,
Stefan

 
 
User avatar
sHagen
Topic Author
Posts: 19
Joined: 13 Aug 2016, 19:02

Re: Color space problems...

01 Feb 2017, 09:24

This is what I see:
https://www.stefanhagen-fotografie.de/c ... 71067).png

Top left: Full size (uploaded with resize)
Top right: Full size (uploaded without resize / original)
Bottom left: Thumbnail
Bottom right: Bigger Image rendered with X3 (I've modified the URL so it matches the render settings of the portrait image)

I think X3 is interpreting the pictures right and my browser is doing it wrong. So the original Image is displayed wrong and the ones resized by X3 are displayed correctly. I will double check later on my Mac, which Photoshop + calibrated screen.

EDIT: As reference, this is what I see when opening the image from the harddrive:
https://www.stefanhagen-fotografie.de/c ... 71169).pngScreenshot

OMG this feels like inception. Because once I show the image in the browser it gets desaturated again. Even the screenshots. So I'm not able to show you how it really looks. Look at this:
https://www.stefanhagen-fotografie.de/c ... 67).png%20(192.pngScreenshot

Sorry, for my lazy formatting...
Last edited by sHagen on 01 Feb 2017, 09:53, edited 2 times in total.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Color space problems...

01 Feb 2017, 09:43

sHagen wrote:Usually I export a web-version, which is 2048x2048 max in width and height. Facebook plays best with that.

In imagevue I did *not* use the upload resizer.
Ok, but the images in your examples in the previous post were 1600px. So you resized locally, to 1600px, before uploading?
sHagen wrote: One further thing I noticed is that portrait size images are handled differently. Lets use these two images:
First of all, now we are speaking of some ENTIRELY different from the COLOR issue, but ok. I already explained the differences in aspects in my previous email, and was hoping to not go into detail. Ok, look at the portrait images on my macbook 13". As you can see, maximum height is 699 PX, and based on THAT aspect, the TARGET WIDTH for this image is 466px. X3 will round that number to 480px, and CORRECTLY load /render/w480-q90/1.index/LenaBertan_0003.jpg.
Image

Lets take a look at the LANDSCAPE image. Also limited to 699px height, TARGET WIDTH is 1048px (YES more than twice the target width of the portrait image, because of the accumulation of factors SCREEN aspect and IMAGE aspect). Based on the target width, X3 will round that value to 1024px, and load /render/w1024-q90/1.index/LenaBertan_0015.jpg
Image
sHagen wrote:My resolution here is 1920x1080.
OK, so let's do some quick math here: 1080px height, with perhaps 100px used by browser navigation and topbars, that leaves 980px available height. TARGET WIDTH for the portrait image therefore becomes 654px (980/1.5 = 654 ... see screenshot below). X3 will round this number UPWARDS to 800px, and load the image /render/w800-q90/1.index/LenaBertan_0003.jpg. Everything is correct.
Image

For the landscape image, which is still limited by the height of your available browser area (approx 980px), TARGET WIDTH for the image would be 1470px (980 * 1.5 = 1470px, see screenshot below). Anything above 1280px will always be rounded to the ORIGINAL image, thus X3 will load the original un-resized image "content/1.index/LenaBertan_0015.jpg" ... Everything correct. Why X3 doesn't serve resized images around 1600px or higher? 1) Why should it? This should be the original "BIG" image. 2) Its pointless to start resizing images past this point. Your ORIGINAL images should be uploaded at the appropriate size to be considered LARGE (>1280px width). 3) MOST servers (if you are on shared hosting), simply don't have the capacity to resize images past some point around 1400px ... An error will be created on image output "memory exhausted".
Image

So as you can see in the examples, the math is correct for image sizing. You must also understand, a portrait image with /w640-q90/ is BIGGER than a landscape image with /w800-q90/ ... (portrait w640: 640*1.5 = 640 x 960), (landscape w800: 800/1.5 = 533 x 800). So understanding this, in addition to the fact that your SCREEN itself supports MUCH larger landscape images than portrait images, YES you will often see portrait-images with a resize factor in the URL. It's all correct.
 
User avatar
sHagen
Topic Author
Posts: 19
Joined: 13 Aug 2016, 19:02

Re: Color space problems...

01 Feb 2017, 10:00

(I added another post with screenshots while you were writing. Did you see this one?)

I meanwhile think the problem is on my side, not on the X3 side. I don't understand it yet. But I will try different export options to find one that works consistently in different applications.

I know effects like this when an image is exported in a Adobe RGB colorspace. Then applications / browser supporting the Adobe color space will display the image correctly while the ones that do not support it will show the image desaturated.

Something like this must happen here. The browser does not support the image color space and shows it desaturated, but X3 does support the color space and converts the image to something the browser can understand.

That would be a logical explanation. However, my images are exported as sRGB, which is the default for web-images and I don't know yet what I could do differently.

More investigation needs to be done on my side. I'll let you know once I know more.

Thank you for your massive support here! I really (really, really) appreciate it.

Best Regards,
Stefan
 
User avatar
sHagen
Topic Author
Posts: 19
Joined: 13 Aug 2016, 19:02

Re: Color space problems...

01 Feb 2017, 10:07

Okay, this is indeed the issue! I was able to fix it in Firefox by making the following changes in "about:config":
Code
gfx.color_management.enablev4 = true # default is false
gfx.color_management.mode = 1 # default is 2
Now the images are displayed correctly.

Now I need to figure out how to export images in a way that this is not necessary. So in the end, X3 is "correcting" the images.
Best Regards,
Stefan
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Color space problems...

01 Feb 2017, 10:52

Nice  :thumbsup: It's late here, but I will read through all the info tomorrow. My knowledge of colorspaces could be improved.
 
marco963
Experienced
Posts: 89
Joined: 14 Oct 2006, 10:22

Re: Color space problems...

01 Feb 2017, 11:21

Ehy guys, I've lost you ! :scream:
 
User avatar
sHagen
Topic Author
Posts: 19
Joined: 13 Aug 2016, 19:02

Re: Color space problems...

01 Feb 2017, 11:29

I've just checked my gallery again. On the Mac, everything looks just fine in all Browsers (Chrome/Firefox/Safari). So the issue is windows specific.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Color space problems...

01 Feb 2017, 12:47

sHagen wrote:I've just checked my gallery again. On the Mac, everything looks just fine in all Browsers (Chrome/Firefox/Safari). So the issue is windows specific.
Did you try different browsers in Windows? Also Chrome? I would have through the issue to be browser-related ...
 
User avatar
sHagen
Topic Author
Posts: 19
Joined: 13 Aug 2016, 19:02

Re: Color space problems...

02 Feb 2017, 04:04

mjau-mjau wrote:Did you try different browsers in Windows? Also Chrome? I would have through the issue to be browser-related ...
Yes, it is browser related.
Windows 7 -> MS IE: OK
Windows 7 -> Chrome: NOT OK
Windows 7 -> Firefox: NOT OK (after enabling the color management support in about:config: OK)
OSX -> Safari: OK
OSX -> Firefox: OK
OSX -> Chrome: OK

However, It happens to my pictures, but not to your pictures on mjau-mjau.com. Therefore I must do something wrong. I just can't figure out what it is. I'm exporting my pictures in Lightroom - or meanwhile in Capture One. As color space, I choose sRGB.
When I look at other galleries, it also happens on some - but not all.
Here for example: This is how it looks: https://youtu.be/X8eFDu667RM (quiet obvious in skin and red tones)

I don't know what X3 is doing to fix the issue for thumbnails, but right now I wish to be able to force X3 to display all pictures through the /render/ engine.

Best Regards,
Stefan
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Color space problems...

02 Feb 2017, 05:17

sHagen wrote:I don't know what X3 is doing to fix the issue for thumbnails, but right now I wish to be able to force X3 to display all pictures through the /render/ engine.
I don't think X3 is "fixing" anything for the resized images ... Instead, the resized images are simply not inheriting some very specific colorspace settings in your images, which some browsers support, while others don't.
  • That is why the resized images look the same across ALL browsers/OS, as the color profile is probably dumped.
  • That is why you see variations on your originals across browsers, because some browsers support your colorspace on the original image, while others do NOT.
sHagen wrote:Windows 7 -> MS IE: OK
Windows 7 -> Chrome: NOT OK
Windows 7 -> Firefox: NOT OK (after enabling the color management support in about:config: OK)
Actually, Chrome and Firefox are probably showing your original images correctly, while Explorer is NOT ... Explorer is probably showing the SAME colors as the resized version, simply because its ignoring colorspace.

Personally, I use an image-optimizer that strips ALL color profiles anyway. I am not sure why spend time on a specific colorspace, when you have no idea how that image will display on the visitors specific screen anyway ... certainly when browsers don't support the color profile.

You definitely should read what imageoptim has to say about it:
https://imageoptim.com/color-profiles.html
Device-dependent color

How “raw” RGB colors really look like depends on capabilities of the monitor they are viewed on. Some monitors display more saturated colors, some monitors are brighter, etc.

Color profiles are supposed to help even out the differences. When a profile is embedded in an image, it describes in exact physical terms how the colors are supposed to look like. Then, the software that displays the image — if it knows exact physical capabilities of the monitor — may adjust image colors to display according to the color profile.

That's the theory. In practice:
  • The majority of typical consumer monitors have a color profile similar to the standard sRGB profile, and can't display any “better” profiles.
  • Almost all images, especially on the Web, were designed to be displayed in the sRGB color profile. When displayed correctly, they look the same on a high-end “wide gamut” monitor as on an average sRGB monitor.
  • Not all browsers and image viewers support color profiles correctly. While basic support has improved in recent years, there are still cases where it's buggy or misconfigured, so it can't be relied upon for anything fancy.
As a result, for most users, embedded color profiles provide no value. Even for the users of high-end monitors there's rarely any benefit, because most images don't contain extremely saturated colors that require a special profile.

However, the use of embedded color profiles has a substantial cost in file size — the profiles can balloon an image by over 100KB! For small images that may multiply their file size.

The solution

Convert images to the sRGB profile, but don't embed it
Save images in the sRGB profile with gamma 2.2, but don't embed any profile in the image. That's the most compatible and most efficient solution.

Software that supports color profiles will assume that images without an embedded profile are in the sRGB profile. Software that doesn't support color profiles will use monitor's profile, which is most likely to be sRGB as well.

Color profiles can be embedded only in PNG and JPEG. GIF images don't have any color correction capability. Stripping color metadata from PNG and JPEG makes their colors consistent with GIF as well as with colors in CSS/HTML.

Configuring software for accurate color

If you're using color-profile-aware software, make sure to configure it to work in the sRGB color space. In Photoshop use Convert to Profile… and choose sRGB IEC61966. When “Saving for Web” check the Convert to sRGB option.
 
User avatar
sHagen
Topic Author
Posts: 19
Joined: 13 Aug 2016, 19:02

Re: Color space problems...

02 Feb 2017, 06:06

I know all this, except one thing... and this is the key information:

"Convert images to the sRGB profile, but don't embed it"

But you are wrong with the browsers. Read my post(s) again. In this case, IE is the only browser that is doing it right. Chrome and Firefox are wrong in this case.

Look at Firefox. With the two settings in "about:config" mentioned above, you can enable color management and then the pictures are displayed correctly afterwards.

You can also find the information on the web. Chrome seems to have a configuration switch "--enable-monitor-profile" but it stopped working somewhere in 2012(!). And it is still not fixed.

I wonder why all professional software like Lightroom/Photoshop/Capture one are embedding the color profile when "saving for web".

I'll check on imageoptm... 

Thank you for helping me to narrow this down. Even it is not directly related to X3.

Best Regards,
Stefan