[Patches] [ python-Patches-751031 ] imghdr -- identify JPEGs in EXIF format

SourceForge.net noreply at sourceforge.net
Fri Jan 7 09:15:59 CET 2005


Patches item #751031, was opened at 2003-06-08 15:08
Message generated for change (Comment added) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=751031&group_id=5470

Category: Library (Lib)
Group: Python 2.4
>Status: Closed
>Resolution: Fixed
Priority: 1
Submitted By: Steven Taschuk (staschuk)
Assigned to: Raymond Hettinger (rhettinger)
Summary: imghdr -- identify JPEGs in EXIF format

Initial Comment:
Someone posted to c.l.py [1] about some of their JPEGs not
being identified as such by imghdr.  Turns out they were 
EXIF files, and imghdr only identifies JFIF files.  A little web 
research suggests EXIF is the usual format for JPEGS from 
digital cameras.

The patch adds the ability to identify such files; they are 
reported as 'jpeg-exif'.  I've no idea whether this is the 
Right Thing.

[1] http://groups.google.com/groups?th=45c0442a1d74e9c4

----------------------------------------------------------------------

>Comment By: Raymond Hettinger (rhettinger)
Date: 2005-01-07 03:15

Message:
Logged In: YES 
user_id=80475

Added Exif detection to Py2.5.  See Lib/imghdr.py 1.12

Exif is JFIF style coding where the APP1 marker has been
added with extra information (thumbnail image and shooting
data.)

For a good overview of the coding, see: 
http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=751031&group_id=5470


More information about the Patches mailing list