summaryrefslogtreecommitdiff
path: root/Lib/imghdr.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-06-23 09:30:50 +0000
committerGuido van Rossum <guido@python.org>1993-06-23 09:30:50 +0000
commitef4f28d63d5666d21e4ebbbbdfdf7971fc3f1d2c (patch)
tree1aea29a853ad1fd659b02b5809705f72dd683073 /Lib/imghdr.py
parent5edbff4b7706459a84c8aa8bcd983b2dc684a6ac (diff)
downloadcpython-ef4f28d63d5666d21e4ebbbbdfdf7971fc3f1d2c.tar.gz
* calendar.py: all libC functionality now moved to built-in time module
* imghdr.py: added jpeg recognition * torgb.py: added jpeg conversion * tzparse.py: use functions from time instead of calendar * whatsound.py: add /ufs/guido/biin/sgi to $PATH when calling 'whatsound'
Diffstat (limited to 'Lib/imghdr.py')
-rw-r--r--Lib/imghdr.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/imghdr.py b/Lib/imghdr.py
index 063bfe82ce..62518b5f36 100644
--- a/Lib/imghdr.py
+++ b/Lib/imghdr.py
@@ -81,6 +81,12 @@ def test_xbm(h, f):
tests.append(test_xbm)
+def test_jpeg(h, f):
+ # JPEG data in JFIF format
+ if h[6:10] == 'JFIF':
+ return 'jpeg'
+
+tests.append(test_jpeg)
#--------------------#
# Small test program #