[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Openexr-devel] Tiled Exr question re: dataWindowForLevel
From: |
Jeremy Selan |
Subject: |
[Openexr-devel] Tiled Exr question re: dataWindowForLevel |
Date: |
Thu, 13 Nov 2008 19:07:24 -0800 |
User-agent: |
Thunderbird 2.0.0.0 (X11/20070326) |
Hello!
We've been playing around with exr mipmap tiling recently, and I'm a bit
surprised on how dataWindowForLevel behaves.
If my test is accurate (and it may not be)...
Say you have a 2K element:
displayRect (0,0) - (2047,1555)
dataRect (768,532) - (1342,1140)
if you use exrmaketiled to make a tiled version
exrmaketiled -m -t 128 128 original.exr mipmap.exr
Reading the levels back, (using header.displayWindow(),
sourceFile.dataWindowForLevel(lx, ly) )
level 0 looks good:
displayRect (0,0) - (2047,1555)
dataRect (768,532) - (1342,1140)
however, level 1 is quite surprising:
(768,532) - (1055,836)
The width and height appear to be correct, (1342-768)*0.5 = 1055-768
However, the origin for level 1 (and in fact all subsequent levels) is
the same as for level 0. (see openexr-1.6.1/IlmImf/ImfTiledMisc.cpp : 77)
Is this expected?
My intuition would have been that the dataWindows's origin would scale
with the width. I.e, this image should read:
(384, 266) - (958,570)
I can always work around this, but I just wanted to get some expert options.
Thanks!
-- Jeremy Selan
- [Openexr-devel] Tiled Exr question re: dataWindowForLevel,
Jeremy Selan <=