Does it help if we use ImageInput instead of ImageBuf for getting the spec
and ten explicitly closing?
def get_resolution_from_attr(file):
"""Getting the resolution from an attribute. Yes there are better ways to
get resolution :)"""
input = oiio.ImageInput(file)
spec = input.spec()
xres = spec.get_attribute('XResolution')
yres = spec.get_attribute('YResolution')
input.close()
return file, xres, yres
~~~~~~~~~~~~~~~~~~
Best Regards,
*Narendra Kumar Vadapalli,*
~~~~~~~~~~~~~~~~~~~~
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org