Module imghdr
[hide private]
[frames] | no frames]

Module imghdr

Recognize image file formats based on their first few bytes.

Functions [hide private]
what(file, h=None)
test_rgb(h, f)
SGI image library
test_gif(h, f)
GIF ('87 and '89 variants)
test_pbm(h, f)
PBM (portable bitmap)
test_pgm(h, f)
PGM (portable graymap)
test_ppm(h, f)
PPM (portable pixmap)
test_tiff(h, f)
TIFF (can be in Motorola or Intel byte order)
test_rast(h, f)
Sun raster file
test_xbm(h, f)
X bitmap (X10 or X11)
test_jpeg(h, f)
JPEG data in JFIF format
test_exif(h, f)
JPEG data in Exif format
test_bmp(h, f)
test_png(h, f)
testall(list, recursive, toplevel)
Variables [hide private]
  tests = []