Add utils to print/display binary maker notes and other EXIF Undefined tags
Bug #959908 reported by
Hobson Lane
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyexiv2 |
In Progress
|
Wishlist
|
Hobson Lane |
Bug Description
Per discussion of Bug #942595 it would be nice to be able to display EXIF "Undefined" strings without garbling a terminal with control codes or ValueError faulting on non-ascii characters, e.g. ord()>128
Ideally, the following code should display human-readable text,
exif = im.exif_keys
for k in im.exif_keys:
print "{0}: {1}".format(
print '------------- Comment -------
print im.comment
print '------
However, these new utils methods won't help unless they are incorporated into the python string output interface for exif tag classes ( ExifTag.
Related branches
To post a comment you must log in.
Here's the patch utils.py that provides functions like
undefined_ to_human( python_ string) to_ascii( python_ string) unprintable( python_ string) int(python_ string)
latin_
escape_
try_
The core exif.py string interface functions are unchanged. And try_int is an alternative more robust fix for Bug #942595, but again it too is not incorporated in the core exif.py. That's left as an exercise for the user (until a later patch or branch).