JEFuller / Piexif

Exif manipulation with pure python script.
MIT License
12 stars 3 forks source link

Printing tag values not working #4

Closed ianengelbrecht closed 2 years ago

ianengelbrecht commented 2 years ago

Great to see this repo has potentially been moved and resurrected. My apologies if logging an issue is premature, but there may be a simple solution so I thought I'd ask.

In the documentation at https://piexif.readthedocs.io/en/latest/functions.html there is an example to print out tag values:

for ifd_name in exif_dict:
    print("\n{0} IFD:".format(ifd_name))
    for key in exif_dict[ifd_name]:
        try:
            print(key, exif_dict[ifd_name][key][:10])
        except:
            print(key, exif_dict[ifd_name][key])

I just get a string of numbers from this. Is there something I need to do to convert that back to a string value?

ianengelbrecht commented 2 years ago

My bad, I just saw you have to use piexif.TAGS to find the corresponding tag name...