本文整理匯總了Python中OpenImageIO.get_int_attribute方法的典型用法代碼示例。如果您正苦於以下問題:Python OpenImageIO.get_int_attribute方法的具體用法?Python OpenImageIO.get_int_attribute怎麽用?Python OpenImageIO.get_int_attribute使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類OpenImageIO
的用法示例。
在下文中一共展示了OpenImageIO.get_int_attribute方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: len
# 需要導入模塊: import OpenImageIO [as 別名]
# 或者: from OpenImageIO import get_int_attribute [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