If you are using class RgbaInputFile to read the file, then the
RY and BY channel names are special; RgbaInputFile assumes that
they are sub-sampled with x and y sampling rates of 2. When you
use class RgbaOutputFile to write a Y/RY/BY image, then the RY
and BY channels will automatically be sub-sampled.
A Y/RY/BY image with without sub-sampling can be read via the
general (arbitrary set of channels) interface, but RgbaInputFile
will reject it. Maybe this should be fixed; the changes in class
RgbaInputFile would be manageable. On the other hand, why would
you want to write Y/RY/BY images without sub-sampling? You might
as well write RGB files.
Florian
Jim Hourihan wrote:
Hi all,
Is there a trick to writing Y RY BY images? I've tried a number of
things and I cannot for the life of me understand what's going on. I've
been able to reduce the problem to the following:
I can successfully write out a scanline piz 3 channel R G B image with
no sub-sampling. By declaring the channels as Y RY BY instead of R G B
(all other things being the same), the Imf library will create a file
that exrheader indicates should be kosher, but exrdisplay will not
read. exrdisplay produces this error:
"X and/or y subsampling factors of "BY" channel of input file "out.exr"
are not compatible with the frame buffer's subsampling factors."
exheader says this:
file format version: 2, flags 0x0
channels (type chlist):
BY, 16-bit floating-point, sampling 1 1
RY, 16-bit floating-point, sampling 1 1
Y, 16-bit floating-point, sampling 1 1
compression (type compression): piz
dataWindow (type box2i): (0 0) - (609 405)
displayWindow (type box2i): (0 0) - (609 405)
lineOrder (type lineOrder): increasing y
pixelAspectRatio (type float): 1
screenWindowCenter (type v2f): (0 0)
screenWindowWidth (type float): 1
This is the case with no sub-sampling indicated (sub-sampling 1) for
both the Channel struct and the Slice. Somehow the Imf library is
treating the image differently because of the channel names. I've been
using the example image Rec709.exr to generate the input. (I would like
to match my output to Rec709_YC.exr eventually).
I tried to update my CVS tree, but it looks like savannah is down. My
last checkout was a couple of weeks ago. (using 1.5)
-Jim
_______________________________________________
Openexr-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/openexr-devel
_______________________________________________
Openexr-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/openexr-devel