Skip to main content
Known Participant
March 11, 2011
Question

Photoshop and Radiance .hdr format

  • March 11, 2011
  • 1 reply
  • 3496 views

Hi,

Photoshop does not work properly with Radiance .HDR files:

      Using FORMAT=32-bit_rle_rgbe


1) It ignores PRIMARIES variable on read, always assuming primaries to
be: sRGB with D65 WP (0.640 0.330 0.290 0.600 0.150 0.060 0.3127 0.3290)
But according to the spec default WP, if no PRIMARIES is present, is 0.333 0.333 .
2) On write, photoshop never embeds the color profile, which is ok.
The problem is that it makes an assumption about the default WP being 0.3127 0.3290 instead
of 0.333 0.333  again.

     Using FORMAT=32-bit_rle_xyze

1) I'm not quite sure about what causes this:
I converted .HDR (sRGB with D65 PRIMARIES, the only 32-bit_rle_rgbe
format photoshop reads properly)
to xyz with Radiance library, saved it in 32-bit_rle_xyze then I

opened both of them in Photoshop and see some color shift to blue in
the converted xyz file.

Cheers,

http://radsite.lbl.gov/radiance/refer/filefmts.pdf page 30

PRIMARIES

The CIE (x,y) chromaticity coordinates of the three (RGB)

primaries and the white point used to standardize the picture's

color system.  This is used mainly by the ra_xyze program to

convert between color systems.  If no PRIMARIES line

appears, we assume the standard primaries defined in

src/common/color.h, namely "0.640 0.330 0.290

0.600 0.150 0.060 0.333 0.333" for red, green, blue

and white, respectively.

This topic has been closed for replies.

1 reply

Chris Cox
Legend
March 11, 2011

Photoshop uses ICC profiles.  And we can't really translate raw primaries into an ICC profile:  too much information is missing.  So we fall back on the "missing profile" logic in Photoshop as if the file had no profile data.

When we write the file, we give the values specified by the document ICC profile.  Again, we can't translate that to raw primaries -- because again too much information would be lost or missing.    And 0.3333, 0.3333 is almost certainly an incorrect white point (equal energy whitepoint, not matching any useful standard).

When reading and saving XYZ data from radiance .hdr files - we use an XYZ profile.  So far experiments with known image data have rendered correctly in Photoshop.  They may not render correctly in applications that are not fully color managed.

V_DAuthor
Known Participant
March 12, 2011

Hi Chris,

Can you please explain me why linear sRGB icc profile can not be translated to PRIMARIES?

Cheers...

Chris Cox
Legend
March 12, 2011

Because the profile does not have primaries - it has the matrix of values necessary to transform values in and out of XYZ or LAB, but does not actually specify the primaries. The values in the matrix include the chromatic adaptation function (adjusting between whitepoints mostly).

See http://color.org/ for more details. (on the surface it seems like profiles contain primaries and whitepoint, but it's not that simple)