I personally think consistency is key so if the approach you suggested doesn’t 
work for all formats I agree the seek method is a good solution. I just wanted 
to make sure I was doing it right.
Thanks !

________________________________
From: Oiio-dev <[email protected]> on behalf of Larry 
Gritz <[email protected]>
Sent: Monday, September 16, 2019 10:11:17 PM
To: OpenImageIO developers <[email protected]>
Subject: Re: [Oiio-dev] EXR multi-part detection

I think that's the most easiest strategy -- try to seek to subimage 1 and if it 
succeeds, it's multi-part. Unless you are very displeased with this 
aesthetically, I think it's a reasonable approach, will work for all image file 
formats, and actually is fairly efficient.

If it would be helpful, I think I could make the exr reader add a special bit 
of metadata to indicate this without having to do the seek. This approach would 
work for openexr, but it wouldn't necessarily be reliable for all image file 
formats, some of which really have no way of knowing if there are subsequent 
images without reading more of the file.


On Sep 16, 2019, at 8:14 PM, Renaud Talon 
<[email protected]<mailto:[email protected]>> wrote:

Hi,

I’m trying to figure out the proper or best way to detect if and EXR image was 
rendered using multi-part. I went through the OIIO documentation and couldn’t 
find any info regarding this.
I also cannot find any metadata that seem to indicate if the EXR was rendered 
using multi-part or not.

Right now I am using the following code to identity mutli-part EXRs but this 
doesn’t seem like the way to go. Thanks.


print(srcImg.seek_subimage(1, 0))

>> True # if EXR was rendered using multi-part
or
>> False # if EXR was NOT rendered using multi-part
_______________________________________________
Oiio-dev mailing list
[email protected]<mailto:[email protected]>
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

--
Larry Gritz
[email protected]<mailto:[email protected]>




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

Reply via email to