(Jack:) Recognize PNG files.

This commit is contained in:
Guido van Rossum 1997-04-11 18:59:38 +00:00
parent 3d82972b85
commit 9e3307494d
1 changed files with 12 additions and 0 deletions

View File

@ -94,6 +94,18 @@ def test_jpeg(h, f):
tests.append(test_jpeg)
def test_bmp(h, f):
if h[:2] == 'BM':
return 'bmp'
tests.append(test_bmp)
def test_png(h, f):
if h[:8] == "\211PNG\r\n\032\n":
return 'png'
tests.append(test_png)
#--------------------#
# Small test program #
#--------------------#