Hi,

Apologies for the beginner questions. Also, for various reasons, I'm using
OIIO 1.5.14 which might be the actual problem.

I've got a multipart exr image, and I'm trying to get all of the channel
names from the many subimages in python, and the data from a particular
channel in C++.

import OpenImageIO as oiio
buf = oiio.ImageBuf(filepath)
print buf.spec().channelnames  # prints channel names from the first
subimage
print buf.nsubimages                # prints 1

I expected nsubimages to report 11, in my example. The sub images are
definitely in the file. Do you know what I'm doing wrong?

Similarly on the C++ side I have something like:

int sub = 0;
OIIO::ImageInput* imgInput = ...
while (imgInput->seek_subimage(sub, miplevel, spec))
{
    std::cout << spec.nchannels << "\n";
    ++sub;
}

It only reports on a single subimage.

Thanks for any tips. I appreciate it.

                        -- Alex
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to