HDRImageViewer icon indicating copy to clipboard operation
HDRImageViewer copied to clipboard

Not recognizing RGBE image color space.

Open jbondhus opened this issue 3 years ago • 2 comments

I've converted an image with ImageMagick from TIF in the ProPhoto RGB space to a .hdr file with primaries set to match this color space. Despite this, the color profile is clearly being interpreted as sRGB in this viewer.

See tiff and hdr file here.

https://jbondhus-sharing.s3.us-east-1.amazonaws.com/2022/2022-11-30/attachment.7z

See below for a comparison between the original TIFF and what the HDR image viewer shows of the .HDR file I generated.

_1001695

The file header is as follows in plain text, which looks correct to me - primaries of ProPhotoRGB...

#?RADIANCE
EXPOSURE=0.1
GAMMA=1
PRIMARIES=0.734699 0.265301 0.159597 0.840403 0.036598 0.000105 0.345704 0.35854
FORMAT=32-bit_rle_rgbe

jbondhus avatar Nov 30 '22 16:11 jbondhus

I've opened a discussion about this with ImageMagick as well, here it is for some additional context. At first we thought it might be a problem with how I was using ImageMagick, but it seems more and more likely that it's a problem with the viewer.

https://github.com/ImageMagick/ImageMagick/discussions/5823

jbondhus avatar Nov 30 '22 16:11 jbondhus

Thanks for your patience and for reporting this.

I am relying on DirectXTex for RGBE decoding, and it appears that it does not implement reading PRIMARIES metadata: https://github.com/microsoft/DirectXTex/blob/main/DirectXTex/DirectXTexHDR.cpp

#51 is also related to RGBE header decoding - potential resolutions are to ask for this functionality to be added to DirectXTex, add my own custom header processing, or find a different decoder library.

13thsymphony avatar Dec 27 '22 16:12 13thsymphony