This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: imghdr -- identify JPEGs in EXIF format
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: rhettinger, staschuk
Priority: low Keywords: patch

Created on 2003-06-08 20:08 by staschuk, last changed 2022-04-10 16:09 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
jpeg-exif.patch staschuk, 2003-06-08 20:08
Messages (2)
msg43918 - (view) Author: Steven Taschuk (staschuk) Date: 2003-06-08 20:08
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
msg43919 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2005-01-07 08:15
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
History
Date User Action Args
2022-04-10 16:09:05adminsetgithub: 38606
2003-06-08 20:08:39staschukcreate