openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openexr-devel] Y RY BY images


From: Florian Kainz
Subject: Re: [Openexr-devel] Y RY BY images
Date: Wed, 14 Mar 2007 18:37:24 -0700
User-agent: Mozilla Thunderbird 1.0 (X11/20041207)



Jim Hourihan wrote:

On Mar 14, 2007, at 3:51 PM, Florian Kainz wrote:

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.

I should have included more info. I'm using Imf::OutputFile to write.
I'm using Imf::InputFile to read (but this is clearly not an issue  because
I can read Rec709_YC.exr and XYZ_YC.exr no problem).

When you are using Imf::OutputFile to write the file, you must specify
the sub-sampling rates in the header's channel list and in the frame
buffer slices.



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.

I want the data sub-sampled, but Imf was core dumping on me. However, I didn't
realize it would do the sampling for me. Is there a way to prevent that?
I already have the data sub-sampled in separate planes (as a result of using
InputFile). My application caches the sub-sampled data for display.

Imf::RgbaOutputFile does the filtering and sampling for you.
With Imf::OutputFile you have to do it yourself.
You should be able to hand sub-sampled data to OutputFile;
after all that's what RgbaOutputFile does internally.

Function writeRead() near line 150 in file IlmImfTest/testCompression.cpp
contains code that writes and reads sub-sampled pixels using the
Imf::OutputFile and Imf::InputFile classes.


I'll try handing it data that's not sub-sampled.

    -Jim







reply via email to

[Prev in Thread] Current Thread [Next in Thread]