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]> 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/~gohlke/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] > 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
