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?
negative values in EXR file problem
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: negative values in EXR file problem
What is your exact command line and platform/OS? (I presume Windows from your magick.exe)
Re: negative values in EXR file problem
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?
I just tried imdisplay.exe as well and it produces a blank image.
Is there some way to attach an file on this forum?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: negative values in EXR file problem
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?
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?
snibgo's IM pages: im.snibgo.com
Re: negative values in EXR file problem
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
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
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: negative values in EXR file problem
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:
The image, out.png, seems reasonable.
Code: Select all
magick camera1_NORMAL.0001_negvals.exr -alpha off out.png
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: negative values in EXR file problem
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
great suggestions snibgo and fmw42 ...
-alpha Opaque worked
thanks for solving this for me
-alpha Opaque worked
thanks for solving this for me