Hi Scott,
There are some scripts at
<https://github.com/OpenImageIO/oiio/tree/master/src/python> but they
seem outdated. The "Python Bindings" chapter in the documentation
<https://github.com/OpenImageIO/oiio/blob/RB-1.1/src/doc/openimageio.pdf> is
empty. For now it's probably best to follow the C++ API and/or read the
source code of the Python bindings.
Christoph
On 3/11/2013 7:16 PM, Scott Wilson wrote:
Hi Chris,
Looks like it works. Thanks! Is there any more examples or documentation
on the Python bindings?
Regards,
Scott Wilson
On Mon, Mar 11, 2013 at 6:55 PM, Christoph Gohlke <[email protected]
<mailto:[email protected]>> wrote:
Hi,
I think the API recently changed. This works for me:
import OpenImageIO as oiio
image_input = oiio.ImageInput.create('jpg', '')
image = image_input.open('oiio-images.__git\\tahoe-gps.jpg')
spec = image.spec()
print image, spec.width, spec.height
<OpenImageIO.ImageInput object at 0x00000000029AE7B8> 2048 1536
--
Christoph
Hello,
The following code is throwing me the following error while running:
import OpenImageIO as oiio
import os
oiio_path = 'C:\Python27\Lib\site-__packages'
file_dir = 'C:\Users\scott\Pictures\__inspiration\characters'
ext = 'jpg'
image_path = os.path.join(file_dir, '000g1kzq.jpg')
image_input = oiio.ImageInput.create(ext, oiio_path)
spec = oiio.ImageSpec()
result = image_input.open(image_path, spec)
print(result)
I get the following traceback:
Traceback (most recent call last):
File "C:/Users/scott/Desktop/oiio___test.py", line 12, in
<module>
result = image_input.open(image_path, spec)
ArgumentError: Python argument types in
ImageInput.open(str, ImageSpec)
did not match C++ signature:
open(class std::basic_string<char,struct
std::char_traits<char>,class
std::allocator<char> > filename)
I'm using OpenImageIO 1.1.6 64 bit for Python 2.7 compiled here:
http://www.lfd.uci.edu/~__gohlke/pythonlibs/#openimageio
<http://www.lfd.uci.edu/%7Egohlke/pythonlibs/#openimageio>
If anyone could let me know if I am doing anything wrong, that
would be
extremely appreciated. Thanks.
_________________________________________________
Oiio-dev mailing list
[email protected] <mailto:[email protected]>
http://lists.openimageio.org/__listinfo.cgi/oiio-dev-__openimageio.org
<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
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org