Return-Path: <g>
Received: from smtp-vbr5.xs4all.nl (smtp-vbr5.xs4all.nl [194.109.24.25])
        by bbl.med.upenn.edu (8.13.1/8.13.1) with ESMTP id l6L0apYb010789
        for <[EMAIL PROTECTED]>; Fri, 20 Jul 2007 20:36:51 -0400
Received: from bag.python.org (bag.python.org [194.109.207.14])
        by smtp-vbr5.xs4all.nl (8.13.8/8.13.8) with ESMTP id l6L0apNx001500
        for <[EMAIL PROTECTED]>; Sat, 21 Jul 2007 02:36:51 +0200 (CEST)
        (envelope-from [EMAIL PROTECTED])
Received: from bag.python.org (bag [127.0.0.1])
        by bag.python.org (Postfix) with ESMTP id 346321E4008
        for <[EMAIL PROTECTED]>; Sat, 21 Jul 2007 02:36:51 +0200 (CEST)
X-Original-To: image-sig@python.org
Delivered-To: [EMAIL PROTECTED]
Received: from bag.python.org (bag [127.0.0.1])
        by bag.python.org (Postfix) with ESMTP id AADFC1E4002
        for <image-sig@python.org>; Sat, 21 Jul 2007 02:36:44 +0200 (CEST)
X-Spam-Status: OK 0.004
Received: from bag (HELO bag.python.org) (127.0.0.1)
        by bag.python.org with SMTP; 21 Jul 2007 02:36:44 +0200
X-Greylist: delayed 1277 seconds by postgrey-1.21 at bag.python.org;
        Sat, 21 Jul 2007 02:36:44 CEST
Received: from pink.rahul.net (pink.rahul.net [192.160.13.6])
        by bag.python.org (Postfix) with ESMTP
        for <image-sig@python.org>; Sat, 21 Jul 2007 02:36:39 +0200 (CEST)
Received: from violet.rahul.net (violet.rahul.net [192.160.13.70])
        by pink.rahul.net (Postfix) with ESMTP id 6C6D830137
        for <image-sig@python.org>; Fri, 20 Jul 2007 17:15:26 -0700 (PDT)
Received: by violet.rahul.net (Postfix, from userid 2926)
        id BF853BC45; Fri, 20 Jul 2007 17:15:23 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
        by violet.rahul.net (Postfix) with ESMTP id BE484BC44
        for <image-sig@python.org>; Fri, 20 Jul 2007 17:15:23 -0700 (PDT)
Date: Fri, 20 Jul 2007 17:03:48 -0700 (PDT)
From: Terry Carroll <[EMAIL PROTECTED]>
X-X-Sender: [EMAIL PROTECTED]
To: image-sig@python.org
In-Reply-To: <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
ReSent-Date: Fri, 20 Jul 2007 17:15:19 -0700 (PDT)
Resent-From: Terry Carroll <[EMAIL PROTECTED]>
Resent-To: image-sig@python.org
ReSent-Subject: Re: [Image-SIG] Exif data
ReSent-Message-ID: <[EMAIL PROTECTED]>
Subject: Re: [Image-SIG] Exif data
X-BeenThere: image-sig@python.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Image Processing with Python SIG <image-sig.python.org>
List-Unsubscribe: <http://mail.python.org/mailman/listinfo/image-sig>,
        <mailto:[EMAIL PROTECTED]>
List-Archive: <http://mail.python.org/pipermail/image-sig>
List-Post: <mailto:image-sig@python.org>
List-Help: <mailto:[EMAIL PROTECTED]>
List-Subscribe: <http://mail.python.org/mailman/listinfo/image-sig>,
        <mailto:[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: [EMAIL PROTECTED]
Errors-To: [EMAIL PROTECTED]
X-Virus-Scanned: by XS4ALL Virus Scanner

On Fri, 20 Jul 2007, Nicolas Pinault wrote:

> I'd like to extract exif data from jpeg iages.
> Here what I do :
> 
> import Image
> i = Image.open ("my picture.jpeg")
> i.info["exif"]

I don't know what to do with that raw data. 

An alternate approach: i._getexif will give you a dictionary of EXIF data,
and the keys are documented in the dictionary ExifData.TAGS.  Here's a
quickie example:

#####################################################
import Image, ExifTags
i = Image.open ("81224044_fa8bc97c54_o.jpg")
exifdata = i._getexif()
print "tags found in image exif data:"
for key in exifdata.keys():
    try:     
        print " ", ExifTags.TAGS[key]
    except KeyError:
        print " *** Unsupported EXIF tag no. %s" % key

print "a few selected tags:"
print " ExifVersion:", exifdata[36864]  
print " Make:", exifdata[271]   
print " Model:", exifdata[272]
#####################################################


Prints (for this image of mine):
#####################################################
tags found in image exif data:
  ExifVersion
  ComponentsConfiguration
  ApertureValue
  DateTimeOriginal
  DateTimeDigitized
  ExifInteroperabilityOffset
  FlashPixVersion
  MeteringMode
  Flash
  FocalLength
  ExifImageWidth
  FocalPlaneXResolution
  Make
  Model
  Orientation
  YCbCrPositioning
  XResolution
  YResolution
  ExposureTime
  ExposureProgram
  ColorSpace
  UserComment
  ISOSpeedRatings
  ResolutionUnit
   *** Unsupported EXIF tag no. 41987
  FNumber
  DateTime
   *** Unsupported EXIF tag no. 41985
   *** Unsupported EXIF tag no. 41990
  FocalPlaneYResolution
  ExifImageHeight
  FocalPlaneResolutionUnit
   *** Unsupported EXIF tag no. 41986
  ExifOffset
  MakerNote
a few selected tags:
 ExifVersion: 0221
 Make: Canon
 Model: Canon EOS DIGITAL REBEL XT
#####################################################




_______________________________________________
Image-SIG maillist  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
Image-SIG maillist  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to