Page 1 of 1

ImageMagick should assume OpenEXR images are linear

Posted: 2012-05-01T03:54:44-07:00
by diego.nehab
Dear ImageMagick developers,

I use ImageMagick everyday, and I can't express how grateful I am for the work you put into this wonderful library.

I have recently started working with OpenEXR images, and I have noticed that the "identify" command lists gamma as 0.45455, even though the documentation for OpenEXR states that values are stored as linear intensities. There does not seem to be a standard attribute for specifying a different gamma value in OpenEXR images, and I believe ImageMagick should honor the specification in assuming a gamma value of 1, rather than assuming 0.45455.

Incidentally, running

convert a.exr -set gamma 1.0 b.exr

has no effect in an OpenEXR file, as "identify" continues to report a gamma 0.45455 for b.exr. Looking at the OpenEXR headers on b.exr does not indicate the presence of any gamma metadata. There really seems to be no mechanism in place for gamma information.

Using the "display" utility to inspect an OpenEXR image naturally shows incorrect results. Interestingly, although running

convert a.exr gamma 2.2 c.exr && display c.exr

shows the correct results, running

display -gamma 2.2 a.exr

does not. By trial and error, I found that the value of 1.5 produces good results with "display" (I have no idea why).

Any way, is this just a misunderstanding on my part?

Kind regards,
Diego

Re: ImageMagick should assume OpenEXR images are linear

Posted: 2012-05-01T04:09:09-07:00
by magick
We can reproduce the problem you posted and have a patch. Look for it in the next point release of ImageMagick. Thanks.

Re: ImageMagick should assume OpenEXR images are linear

Posted: 2012-05-03T18:46:19-07:00
by anthony
If that is the case then OpenEXR images should also have colorspace RGB and not sRGB!

Re: ImageMagick should assume OpenEXR images are linear

Posted: 2012-05-10T17:50:43-07:00
by fmw42
I see that this has been changed in IM 6.7.6.9

I checked the verbose info for an exr image I have been using in the past for my tonemapping and the results of my scripts have changed. I was just wondering what the rendering intent should be for exr. I see it is set to perceptual and am wondering if this may also be one contributing factor to my script differences between IM 6.7.5.10 and 6.7.6.9. Also in the old version, chromaticity values are not set, but they are in the current im version.

see
viewtopic.php?f=3&t=20983