Skip to content

Is it possible to access additional EXIF tags #7486

Answered by radarhere
DynamicsAXHelp asked this question in Q&A
Discussion options

You must be logged in to vote
import os
from PIL import Image, ExifTags, IptcImagePlugin
with Image.open("IMG_2115.jpg") as im:
    print("FileName =", im.filename)
    print("FileSize =", os.path.getsize("IMG_2115.jpg"))
    print("FileType =", im.format)
    print("FileTypeExtension =", os.path.splitext(im.filename)[1][1:].upper())
    print("MIMEType =", im.get_format_mimetype())

    description = im.getxmp()["xmpmeta"]["RDF"]["Description"]
    print("| City =", description["City"])
    print("| State =", description["State"])
    print("| Country =", description["Country"])
    print("| Headline =", description["Headline"])
    print("| CountryCode =", description["CountryCode"])
    print("| Location =", descri…

Replies: 4 comments 13 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
10 replies
@DynamicsAXHelp
Comment options

@radarhere
Comment options

@DynamicsAXHelp
Comment options

@radarhere
Comment options

@DynamicsAXHelp
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@radarhere
Comment options

Answer selected by radarhere
@DynamicsAXHelp
Comment options

@DynamicsAXHelp
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants