0

I'm stuck with a script in Python. I look after many topics about PIL... but I can't find the way to get the right information from a picture.

I want to get in Python the keywords from a specific picture, I mean, when you go to the property panel > details, you have keywords you can write with adobe bridge for example

Any idea about this?

HaveNoDisplayName
  • 8,291
  • 106
  • 37
  • 47
guiillt
  • 1
  • 2
  • 1
    Let us see what you got. part or full script – Andersson Jul 10 '15 at 12:34
  • 2
    You are after the EXIF data. Please see: http://stackoverflow.com/questions/4764932/in-python-how-do-i-read-the-exif-data-for-an-image – A_A Jul 10 '15 at 12:37
  • Hello and welcome to StackOverflow. Please take some time to read the help page, especially the sections named ["What topics can I ask about here?"](http://stackoverflow.com/help/on-topic) and ["What types of questions should I avoid asking?"](http://stackoverflow.com/help/dont-ask). And more importantly, please read [the Stack Overflow question checklist](http://meta.stackexchange.com/q/156810/204922). You might also want to learn about [Minimal, Complete, and Verifiable Examples](http://stackoverflow.com/help/mcve). – Morgan Thrapp Jul 10 '15 at 13:24

1 Answers1

1

Using the IPTCInfo package, we can extract and modify IPTC (metadata) information on images.

For example:

from iptcinfo import IPTCInfo
import sys
fn = 'test.jpg'
# Create new info object
info = IPTCInfo(fn)
print info.keywords
approxiblue
  • 6,982
  • 16
  • 51
  • 59
lovetam111
  • 11
  • 1