Hi Daniel,

Thanks for the quick reply!

Unfortunately that code snippet doesn't work for me on version 1.8.11. I'll
check to see if it's a problem with the version or with the Photoshop file
I'm using.

On Tue, 30 Oct 2018 at 11:56, Daniel Flehner Heen <[email protected]>
wrote:

> Hey Ray!
>
> Strange that nsubimages are always 1. I've successfully done the following
> in python (oiio1.8.5):
>
> import OpenImageIO as oiio
>
> sourcefile = '/path/to/sourcefile.psd'
> buf = oiio.ImageBuf(sourcefile)
>
> for layer in range(buf.nsubimages):
>     buf.reset(sourcefile, subimage=layer)
>     buf.write('/tmp/mylayer_{l}.exr'.format(l=layer))
>
>
>
> On Tue, Oct 30, 2018 at 12:01 PM Ray <[email protected]> wrote:
>
>> Hi All,
>>
>> I'm looking to import a PSD file, split it into it's respective layers,
>> and export each layer as an .exr file. I've been looking through the
>> documentation and it seems like it could be done with the PSDInput in C++
>> (I have yet to try) but when I try to achieve this in python there doesn't
>> seem to be any way to access the layers that I can see.
>>
>> When I import my psd file it loads in just fine, and when I export the
>> whole image as exr it works as expected. What's not working for me (or I'm
>> doing it wrong) is accessing the layers themselves. When I try to view the
>> number of subimages there is only ever one.
>>
>> Is there something I'm missing, or is this something that I'll need to do
>> in C++?
>>
>> Many thanks,
>> Ray.
>> _______________________________________________
>> Oiio-dev mailing list
>> [email protected]
>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>>
>
>
> --
> -Daniel
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to