[Python-checkins] python/dist/src/Lib imghdr.py,1.11,1.12

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Fri Jan 7 09:16:13 CET 2005


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32158/Lib

Modified Files:
	imghdr.py 
Log Message:
SF #75103:  imghdr -- identify JPEGs in EXIF format



Index: imghdr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/imghdr.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- imghdr.py	24 Jan 2001 06:27:27 -0000	1.11
+++ imghdr.py	7 Jan 2005 08:15:40 -0000	1.12
@@ -101,6 +101,13 @@
 
 tests.append(test_jpeg)
 
+def test_exif(h, f):
+    """JPEG data in Exif format"""
+    if h[6:10] == 'Exif':
+        return 'jpeg'
+
+tests.append(test_exif)
+
 def test_bmp(h, f):
     if h[:2] == 'BM':
         return 'bmp'



More information about the Python-checkins mailing list