openexr-devel
[Top][All Lists]
Advanced

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

Re: [Openexr-devel] Reading Only Specified Channels


From: Florian Kainz
Subject: Re: [Openexr-devel] Reading Only Specified Channels
Date: Fri, 22 Jul 2005 09:22:45 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040114

Jeff Higgins wrote:
I'm just starting to get into openexr and I have a question about what the current version supports.

If I have an exr image that has say 12 channels and I only need to read 3 of them (not necessarily RGB) does the reader support only reading the 3 channels that I'm interested or do I need to read the entire file just to get the 3 channels that I'm interested in.

My inclination is that is very much possible. If so is there example code that I can use as reference.


Yes, this is possible.

Before reading any pixels from the file you
must tell the InputFile object about the
memory layout of your frame buffer using the
setFrameBuffer() method.  If the file contains
channels that are not in the frame buffer, then
those channels are discarded during reading.
If the frame buffer contains channels that are
not in the file, then those channels are filled
with a default value.

For more information about the OpenEXR API see
ReadingAndWritingImageFiles.pdf, available on
the OpenEXR web site.

Florian





reply via email to

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