Hi!
I'm using oiio with python to read metadata from images. Now I got a
problem with GPS metadata, I don't get the whole tuple. Python is a new
language for me, so this problem could be my fault.
image = ImageBuf(filepath)
spec = image.spec()
exifreturnstring = {}
for i in range(len(spec.extra_attribs)) :
exifreturnstring[spec.extra_attribs[i].name] =
spec.extra_attribs[i].value
This method will only get the first part of the lat or lon tuple. E.g 17
for longitude.
But I get all 3 parts if I add a if to the loop and use get_attribute
method for types that has more than 1 element.
for i in range(len(spec.extra_attribs)) :
if spec.extra_attribs[i].type.numelements() > 1:
exifreturnstring[spec.extra_attribs[i].name] =
spec.get_attribute(spec.extra_attribs[i].name)
else:
exifreturnstring[spec.extra_attribs[i].name] =
spec.extra_attribs[i].value
I can't use the get_attribute for all extra attributes because it gives me
null for many integers.
So my question is if it is possible to get the whole tuple from
spec.extra_attribs[i].value?
Best regards
Tobias
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org