List Info

Thread: how to get exif information




how to get exif information
user name
2006-01-31 22:03:59
Winfried Diehm wrote:

> got pil 1.1.5 installed and running.
> Want to get exif information from jpeg-images. When I
open an image, the image
> has a method info. This method returns a dict with one
key. The value is a
> string with 14403 characters. For example:
> >>> im.info.keys()
> ['exif']
> >>> im.info["exif"][0:20]
>
'Exifx00x00II*x00x08x00x00x00x0bx00x0ex01x02x00
'
> How can I get the exif information (human readable out of
the string ?

try calling the _getexif() method on the im object.  if
successful, this
method returns a dictionary mapping exif tags to
corresponding values.

(the ExifTags module contains a dictionary mapping tag
values to tag
names).

for a little more information, and some useful links, see
this post:

    http://mail.python.org/pipermail/image-sig/2005-
July/003427.html

</F>



_______________________________________________
Image-SIG maillist  -  Image-SIGpython.org
htt
p://mail.python.org/mailman/listinfo/image-sig
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )