HDR tiff and EXR files lack color space from input files

Bug #1752135 reported by Johannes Wienke on 2018-02-27
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

I am regularly creating HDR files (EXR and TIFF) from 16 bit source files using the ProPhoto RGB color space. The resulting HDR outputs generated by Hugin render with shifted colors. For EXR, sRGB is wrongly assigned to the file. 32 bit TIFFs are instead untagged and do not carry a color profile at all. As soon as I manually assign a profile, colors are back to normal.

Hugin (or whatever process is used in the background), needs to assign the input color space also to the generated output HDR files.

All of this happens with Hugin 2017.0.0.eac5e8cc546e on Windows 10, using the standard built-in tools.

Btw, I have been searching for ages how to assign a color space manually to a file. I ended up using:
magick "DSC_7847 - DSC_7856_hdr.tif" -profile proto.icc out.tiff

tmodes (tmodes) wrote :

The source contains code to copy the icc profile.
Can you provide a source image and the corresponding pto file for testing?

The OpenEXR format does not officially support icc profile. (Some programs seems to use a private extension, but no officially.) So I fear there is currently no (official) way to copy the icc profile to exr file. I can therefore test only the tiff file.

Changed in hugin:
status: New → Incomplete
Johannes Wienke (languitar) wrote :

You can find the source files, the PTO and the resulting HDR tiff of a reduced-size experiment showing the problem here: https://ssl.semipol.de/seafile/d/120ec00dea7847ef90a8/

tmodes (tmodes) wrote :

The main problem is that OpenEXR does not support icc profiles, and Hugin is using the exr format as intermediate format for HDR output.
But I implemented a workaround: The metadata transfer is now also called for HDR output (this was currently missing). Beside this new version you need to add "-icc_profile" to the final argfile for exiftool in preferences, stitching (2).

(You can copy the icc profile also with exiftool -tagsfromfile input.tif -icc_profile out.tif.)

Changed in hugin:
milestone: none → 2018.2beta1
status: Incomplete → Fix Committed
Johannes Wienke (languitar) wrote :

Thank you. Isn't there a chance to make the setting the default?

tmodes (tmodes) wrote :

For LDR images the icc profile is copied in depended of this argfile.
But for HDR images I'm not sure, if the icc profile is the correct way. There are contrary opinions about this. So, currently I don't make this the default.

tmodes (tmodes) on 2019-01-26
Changed in hugin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers