Pages: [1]   Go Down

Author Topic: Rendering untagged images properly  (Read 2441 times)

shewhorn

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 537
    • http://
Rendering untagged images properly
« on: October 28, 2010, 03:10:26 pm »

I have a bit of a head scratcher on my hands.

So, if I take an image like this:

http://www.lagom.nl/lcd-test/black.php

It renders properly in Firefox 3.6 (it doesn't render properly in Safari but that's Apple's bug). It's an untagged, indexed PNG.

If I try to recreate a similar black patch test image with 10 patches from 1,1,1 to 10,10,10 (untagged... tried both RGB and indexed modes) and save it as a PNG, it renders properly in Photoshop but when I open it up in Firefox and view it, it's obviously rendering quite differently (and for clarity if I view the image downloaded from lagom in both PS and then in Firefox they both render identically). I'm not sure why. I downloaded the images from the lagom website (you can find them here http://www.lagom.nl/lcd-test/ ) and I noticed that when viewing them in Bridge, Bridge identifies the images I've saved as either being indexed or RGB untagged images. With the Lagom images though it does not identify the image mode, just that the profile is untagged.

Anyone have any ideas as to what is going on? Is there a bug in Photoshop CS4 that's perhaps not writing the metadata properly or is there a bug in the various browsers that requires a modification to the metadata to render as expected?

Cheers, Joe
Logged

digitaldog

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 20614
  • Andrew Rodney
    • http://www.digitaldog.net/
Re: Rendering untagged images properly
« Reply #1 on: October 28, 2010, 03:13:28 pm »

http://www.lagom.nl/lcd-test/black.php
It renders properly in Firefox 3.6 (it doesn't render properly in Safari but that's Apple's bug). It's an untagged, indexed PNG.

What makes you say it doesn’t render properly in Safari (what bug)? Safari assumes all untagged documents are in display RGB. The 20 squares look OK to me, all separate in Safari. I’m not sure that means it renders properly or not.
Logged
http://www.digitaldog.net/
Author "Color Management for Photographers".

shewhorn

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 537
    • http://
Re: Rendering untagged images properly
« Reply #2 on: October 28, 2010, 05:42:53 pm »

Safari assumes all untagged documents are in display RGB. The 20 squares look OK to me, all separate in Safari. I’m not sure that means it renders properly or not.

Hmmm....

It's not doing that on either my MacBook Pro or my Mac Pro (Safari 5.0.2). I created a Granger Chart and then saved two versions... one untagged, and one tagged in sRGB. I opened each up in a tab in Safari and toggled back and forth. There's an unmistakable difference between the two. In theory if it's assumed that the profile is sRGB in the absence of an embedded profile, then the two should look the same but that's definitely not the case. If you go into about:config in Firefox and set gfx.color_management.mode to 1 it will assume that untagged images have an sRGB profile. If you set it to 2 it will only color manage images that are tagged with a profile. I tested this and it works as expected (the granger charts appear identical in mode 1 and different in mode 2).

As for Safari if I look at http://www.lagom.nl/lcd-test/black.php for the 1, 2, and 3 black patches (using the Digital Color Meter only because the numbers I'm seeing correlate with the color casts I'm seeing in Safari) I get.... 0,11,0; 8,8,8, 0,13,8. For Firefox I get 6,6,6; 8,8,8; 10,10,10... all neutral.


At least I know I'm not the only one:

http://discussions.apple.com/thread.jspa?threadID=2453291&tstart=405

The reference I made to the bug was that it appears as if Safari is doing something yet again (applying the monitor profile perhaps... that wouldn't make sense though because I'm viewing it on my 2nd display which is an NEC2690, the Video LUT is a straight line, no corrections... the corrections are all in the Monitor LUT). Anyhow... I have absolutely no clue what's going on there. On both my primary and secondary screen, there's tons of green color cast on the blocks in the link above that do not appear in Firefox or Photoshop.

Cheers, Joe
« Last Edit: October 28, 2010, 05:44:25 pm by shewhorn »
Logged

shewhorn

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 537
    • http://
Re: Rendering untagged images properly
« Reply #3 on: October 28, 2010, 06:20:31 pm »

Ahhh... here's a clue...

If I set FireFox to mode 1 and look at the image I generated the black levels for "1,1,1; 2,2,2; etc." look the same. If I set it to mode 2 in FF (which doesn't color manage untagged images) I get the following values from the Digital Color Meter:

1,1,1; 2,2,2; 3,3,3; 4,4,4; etc.

Well, that's interesting! So, it appears as if they're somehow applying an sRGB curve but keeping the image untagged somehow? Go here and scroll down to the black:

http://www.lagom.nl/lcd-test/all_noprofile.php

Now go here:

http://www.lagom.nl/lcd-test/black.php

Right click on each file and do a save as (I saved the first as blacktest.png and the second as blacktest_noProf.png). Now, open these files in different tabs under both FireFox and Safari (with FireFox in mode 2). FF renders the blacktest file as if it had an sRGB curve applied (even though the Metadata says it's untagged) and the blacktest_noProf as if it has no profile applied. Safari renders the blacktest file with tons of color casts and the blacktest_noProf identically to how FF renders the blacktest_noProf file.

Cheers, Joe
Logged

digitaldog

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 20614
  • Andrew Rodney
    • http://www.digitaldog.net/
Re: Rendering untagged images properly
« Reply #4 on: October 28, 2010, 06:23:49 pm »

If you assign the display profile to the Granger, it matches the untagged doc in Safari (at least it does for me). I have an untagged doc and a doc with the display profile embedded, the two match. They do not match the sRGB doc. It also matches the tagged display profile granger in Photoshop which makes sense. The tagged sRGB doc in Safari matches the tagged sRGB doc in Photoshop.
Logged
http://www.digitaldog.net/
Author "Color Management for Photographers".

shewhorn

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 537
    • http://
Re: Rendering untagged images properly
« Reply #5 on: October 28, 2010, 06:55:15 pm »

If you assign the display profile to the Granger, it matches the untagged doc in Safari (at least it does for me). I have an untagged doc and a doc with the display profile embedded, the two match. They do not match the sRGB doc. It also matches the tagged display profile granger in Photoshop which makes sense. The tagged sRGB doc in Safari matches the tagged sRGB doc in Photoshop.

D'OH.... never mind. Yeah, I've been in complete agreement with you on that the entire time. You posted this:

Quote
What makes you say it doesn’t render properly in Safari (what bug)? Safari assumes all untagged documents are in display RGB.

Here's what my brain read:

Quote
What makes you say it doesn’t render properly in Safari (what bug)? Safari assumes all untagged documents are in sRGB.

I tend to do that a lot. Oy. Drives me (and other people) nuts. Sorry about the confusion there.

Okay, getting myself back on track... agreed, that's the same behavior I get from Safari BUT.... with these particular images something funky is going on. Check out my last post and download those two files. With the file sourced from this link: http://www.lagom.nl/lcd-test/black.php Safari goes totally whackadoodle. It's not only Safari but it's also Preview as well (and I would assume any other Apple coded application). It appears as if something non-standard has been done to that file and Safari really doesn't like it. It seems as if they've somehow applied an sRGB curve whilst somehow still keeping the image untagged? The second link in my previous post is truly untagged. If you look at the metadata for the both of them, the first one doesn't show any color mode, and the second one shows up as indexed. The second one renders just fine in Safari (in display RGB as you mentioned).

Cheers, Joe
Logged

shewhorn

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 537
    • http://
Re: Rendering untagged images properly
« Reply #6 on: October 28, 2010, 06:57:25 pm »

BTW... disregard my original post. Everything appears to be working as I would expect it to... at least with the files I've generated. I'm on a tangent now wondering how one applies an sRGB curve to an untagged image.

Cheers, Joe
Logged

shewhorn

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 537
    • http://
Re: Rendering untagged images properly
« Reply #7 on: November 02, 2010, 03:12:56 am »

Poking around a little more it looks like he's generated the test images using code he wrote himself. That certainly might explain why there's no color mode in the meta data of some of those images.
Logged
Pages: [1]   Go Up