Page 1 of 1

negative values in EXR file problem

Posted: 2017-06-01T10:03:56-07:00
by willanie
Im using Using ImageMagick-7.0.5-3-Q16-HDRI-x64
I have a 16bit exr image that contains negative values.
Im using montage to create a contact sheet of exr images with magick.exe and I notice that the image with negative values is resulting in a blank thumbnail.
Is there a workaround?

Re: negative values in EXR file problem

Posted: 2017-06-01T11:17:26-07:00
by fmw42
What is your exact command line and platform/OS? (I presume Windows from your magick.exe)

Re: negative values in EXR file problem

Posted: 2017-06-01T12:33:01-07:00
by willanie
Im on windows7.
I just tried imdisplay.exe as well and it produces a blank image.
Is there some way to attach an file on this forum?

Re: negative values in EXR file problem

Posted: 2017-06-01T15:04:23-07:00
by snibgo
You can upload image files to somewhere like dropbox.com, and paste the URLs here.

I could be wrong, but I thought that in EXR RGB format, zero is black, so negative values are blacker than black. Though valid, this is often rounded to black.

If you don't want negative values to be black, what do you want?

Re: negative values in EXR file problem

Posted: 2017-06-01T16:11:39-07:00
by willanie
Its not that I get black ... its broken when this exr file is used in a process that outputs an 8bit integer result.
If I try to imdisplay an exr which has some negative values it show a totally transparent result ... nothing shows even in the areas where the values are positive.
Also when converting the same exr(which is actually a normalmap with value ranges from -1.0 to 1.0) to a png or jpg I get an empty output.
I would expect that the exr with negative float values would result in black in those areas when exported to a 8bit integer file format not an empty file.
The strange thing is I can process and export to a new exr file and everything works fine.

here is the link to the exr file

https://drive.google.com/open?id=0B4Cuh ... 3F4ZHQ2Q3M

Re: negative values in EXR file problem

Posted: 2017-06-01T16:24:33-07:00
by snibgo
An integer version of IM, v6.9.5-3, says the RGB value range from 0.0 to 100%, but all pixels have zero alpha (fully transparent). To remove transparency, use "-alpha off", eg:

Code: Select all

magick camera1_NORMAL.0001_negvals.exr -alpha off out.png
The image, out.png, seems reasonable.

Re: negative values in EXR file problem

Posted: 2017-06-01T16:40:54-07:00
by fmw42
It may be than montage does not work well in HDRI mode for images with values outside the normal range, such as negative values. Try using convert in IM 6 or magick in IM 7 to simple convert your image to the format you want. Does that work? Check your same process for montage in IM 6? Does that work? ImageMagick convert/magick should be able to handle negative values and scale them to some reasonable range or clip them if you are using HDRI mode, which you said you were in your original post.

Re: negative values in EXR file problem

Posted: 2017-06-01T17:12:11-07:00
by willanie
great suggestions snibgo and fmw42 ...
-alpha Opaque worked
thanks for solving this for me