Provide access to interpreted (translated) data

Bug #147534 reported by Michal Čihař
2
Affects Status Importance Assigned to Milestone
pyexiv2
Fix Released
Medium
Olivier Tilloy

Bug Description

Could you please provide access to interpreted (translated) data from exiv2 also?

Revision history for this message
Olivier Tilloy (osomon) wrote :

In fact, the interpreted data value as displayed by exiv2 is already accessible from pyexiv2, although quite hidden: the method _Image__getExifTagToString(key) returns this interpreted value as shown in the example below:

>>> image=pyexiv2.Image('xmptest.jpg')
>>> image.readMetadata()
>>> key = 'Exif.Image.Orientation'
>>> print key, ":", image[key], "/", image._Image__getExifTagToString(key)

    Exif.Image.Orientation : 2 / top, right

This method needs to be made more accessible, this bug will track the implementation of this functionality.

Olivier Tilloy (osomon)
Changed in pyexiv2:
assignee: nobody → osomon
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Olivier Tilloy (osomon) wrote :

Implementation committed with revision 71.

Added method interpretedExifValue(key) to class Image that returns the interpreted value of an EXIF tag as displayed by the exiv2 command-line tool.
Here is an example of how to use it:

>>> import pyexiv2
>>> image = pyexiv2.Image('image.jpg')
>>> image.readMetadata()
>>> for key in image.exifKeys():
... print key, '=', image.interpretedExifValue(key)

Changed in pyexiv2:
status: In Progress → Fix Committed
Revision history for this message
Michal Čihař (nijel) wrote :

Thanks!

Olivier Tilloy (osomon)
Changed in pyexiv2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.