Hi again!

Ok, so I tried and got this Traceback. Seems like it doesn't like my
tuples. I tried a few variations with no luck

>>> import OpenImageIO as oiio
>>> buf = buf = oiio.ImageBuf(oiio.ImageSpec(1920, 1080, 3, oiio.HALF))
>>> buf.specmod().attribute('smpte:TimeCode', oiio.TIMECODE, (421729315, 0))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
Boost.Python.ArgumentError: Python argument types in
    ImageSpec.attribute(ImageSpec, str, VECSEMANTICS, tuple)
did not match C++ signature:
    attribute(OpenImageIO_v1_8::ImageSpec {lvalue}, std::string,
OpenImageIO_v1_8::TypeDesc, boost::python::tuple {lvalue})
    attribute(OpenImageIO_v1_8::ImageSpec {lvalue}, std::string,
OpenImageIO_v1_8::TypeDesc, boost::python::api::object {lvalue})
    attribute(OpenImageIO_v1_8::ImageSpec {lvalue}, std::string,
std::string)
    attribute(OpenImageIO_v1_8::ImageSpec {lvalue}, std::string, int)
    attribute(OpenImageIO_v1_8::ImageSpec {lvalue}, std::string, float)



On Sat, Dec 2, 2017 at 7:51 PM, Daniel Flehner Heen <[email protected]
> wrote:

> Thank you so much! I'll try it and report back!
>
> On Dec 2, 2017 19:46, "Larry Gritz" <[email protected]> wrote:
>
>> Yes, I think that if you do something like
>>
>>     spec.attribute ("smpte:timecode", oiio.TimeCode, (bcdint,userint))
>>
>> that should add the timecode to the imagespec. You then have to write a
>> file with it, of course.
>>
>>
>> On Dec 2, 2017, at 10:40 AM, Daniel Flehner Heen <[email protected]>
>> wrote:
>>
>> OK, so could I pass a list or tuple with the timecode (BCD) in index 0
>> and something else in index 1? According to wikipedia the second half of
>> the int[2] should be userdata, an i correct? What should i provide in that
>> case?
>>
>> Thanks,
>> Daniel
>>
>>
>> On Dec 2, 2017 19:12, "Larry Gritz" <[email protected]> wrote:
>>
>> Ah, so here's the crazy thing: timecode attributes (according to OpenEXR)
>> aren't strings, they are encoded as an int[2], as described in
>> https://github.com/openexr/openexr/blob/develop/OpenEXR/I
>> lmImf/ImfTimeCode.h
>>
>>
>> On Dec 2, 2017, at 4:53 AM, Daniel Flehner Heen <[email protected]>
>> wrote:
>>
>> Hello!
>> Not sure if this got through before I joined the list. Sorry about the
>> double post on that case.
>>
>>
>> On Dec 1, 2017 01:00, "Daniel Flehner Heen" <[email protected]>
>> wrote:
>>
>> Hi!
>>
>> Apologize if this is the wrong mail list for this, but is there a way to
>> add a timecode to EXR's in python?
>> I read a thread once discussing a way of adding timecode to all supported
>> formats, but I'm not sure how it ended.
>> I've tried specmod().attribute("smpte:timecode", <value>) without
>> success where value was either string or a BCD int same as one I got from a
>> frame with timecode. It didn't complain, but no valid timecode appears in
>> exrhreader or RV for instance.
>>
>> Am I missing something obvious or is this still not implemented?
>>
>> Thanks,
>> -Daniel
>>
>>
>> _______________________________________________
>> Oiio-dev mailing list
>> [email protected]
>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>>
>>
>> --
>> Larry Gritz
>> [email protected]
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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
>>
>>
>> --
>> Larry Gritz
>> [email protected]
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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