Page 1 of 1

DataWindow vs DisplayWindow in OpenEXR

Posted: 2012-03-21T01:30:28-07:00
by danielHeen
Hello!

OpenEXR has two different values describing the image size.
1. The DisplayWindow, which is the size of the displayed image.
2. The DataWindow, which may be bigger then the DisplayWindow and holds information not displayed by default.

The later may often be the result of composed images of different sizes. The bounding box becomes bigger then the DisplayWindow.

My problem is that the convert command doesn't diffrenciate between the two. It assumes that the DataWindow and DisplayWindow are the same. This results in an image larger then expected with the last row of pixels on the edges get stretched to fit the new size.

Code: Select all

identify image.0001.exr
image.0001.exr EXR 2458x1382 2458x1382+0+0 16-bit DirectClass 10.37MB 0.000u 0:00.009
Note that the two geometry sizes are the same above and that they actually are different below.
Please also note that identify lists a wider image then the exrheader tool.

Code: Select all

exrheader image.0001.exr 

image.0001.exr:

file format version: 2, flags 0x0
channels (type chlist):
    B, 16-bit floating-point, sampling 1 1
    G, 16-bit floating-point, sampling 1 1
    R, 16-bit floating-point, sampling 1 1
compression (type compression): piz
dataWindow (type box2i): (0 -230) - (2457 1151)
displayWindow (type box2i): (0 0) - (2047 1151)
lineOrder (type lineOrder): increasing y
nuke/node_hash (type string): "4b66b5bf5d8d65d5"
pixelAspectRatio (type float): 1
screenWindowCenter (type v2f): (0 0)
screenWindowWidth (type float): 1
Am I missing an option in convert or is this a "bug"?

Thanks,
-Daniel

Re: DataWindow vs DisplayWindow in OpenEXR

Posted: 2012-03-21T04:41:19-07:00
by magick
We can reproduce the problem you reported and have a patch in the Subversion trunk available by sometime tomorrow. Look for it in the ImageMagick 6.7.6-2 release in just a few weeks.