本文整理汇总了Python中OpenImageIO.getattribute方法的典型用法代码示例。如果您正苦于以下问题:Python OpenImageIO.getattribute方法的具体用法?Python OpenImageIO.getattribute怎么用?Python OpenImageIO.getattribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenImageIO
的用法示例。
在下文中一共展示了OpenImageIO.getattribute方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: len
# 需要导入模块: import OpenImageIO [as 别名]
# 或者: from OpenImageIO import getattribute [as 别名]
print "getattribute('foo_str') retrieves", s.getattribute("foo_str")
print "getattribute('foo_vector') retrieves", s.getattribute("foo_vector")
print "getattribute('foo_matrix') retrieves", s.getattribute("foo_matrix")
print "getattribute('foo_no') retrieves", s.getattribute("foo_no")
print
print "extra_attribs size is", len(s.extra_attribs)
for i in range(len(s.extra_attribs)) :
print i, s.extra_attribs[i].name, s.extra_attribs[i].type, s.extra_attribs[i].value
print s.metadata_val (s.extra_attribs[i], True)
print
# test initialization from ROI
print ("Testing construction from ROI:")
sroi = oiio.ImageSpec (oiio.ROI(0,640,0,480,0,1,0,3), oiio.FLOAT);
print_imagespec (sroi)
# Also test global OIIO functions here
print "\nTesting global attribute store/retrieve:"
oiio.attribute ("plugin_searchpath", "perfect")
print "get_string_attribute plugin_searchpath : ", oiio.get_string_attribute ("plugin_searchpath", "bad")
print "get_int_attribute plugin_searchpath : ", oiio.get_int_attribute ("plugin_searchpath", 0)
print "getattribute TypeString plugin_searchpath : ", oiio.getattribute ("plugin_searchpath", oiio.TypeDesc.TypeString)
print "getattribute TypeFloat plugin_searchpath : ", oiio.getattribute ("plugin_searchpath", oiio.TypeDesc.TypeFloat)
print "getattribute TypeString blahblah : ", oiio.getattribute ("blahblah", oiio.TypeDesc.TypeString)
print "Done."
except Exception as detail:
print "Unknown exception:", detail