Back to module index

Go to module by name

imghdr

Recognize image file formats based on their first few bytes.

Classes

PathLike

Abstract base class for implementing the file system path protocol.

Functions

test

test()

test_bmp

test_bmp(h, f)

test_exr

test_exr(h, f)

test_gif

test_gif(h, f)

  GIF ('87 and '89 variants)

test_jpeg

test_jpeg(h, f)

  JPEG data in JFIF or Exif format

test_pbm

test_pbm(h, f)

  PBM (portable bitmap)

test_pgm

test_pgm(h, f)

  PGM (portable graymap)

test_png

test_png(h, f)

test_ppm

test_ppm(h, f)

  PPM (portable pixmap)

test_rast

test_rast(h, f)

  Sun raster file

test_rgb

test_rgb(h, f)

  SGI image library

test_tiff

test_tiff(h, f)

  TIFF (can be in Motorola or Intel byte order)

test_webp

test_webp(h, f)

test_xbm

test_xbm(h, f)

  X bitmap (X10 or X11)

testall

testall(list, recursive, toplevel)

what

what(file, h=None)

Other members

tests = [<function test_jpeg at 0x7f75e0c9dcf0>, <function test_png at 0x7f75e0c9df30>, <function test_gif at 0x7f75e0c9dea0>, <function test_tiff at 0x7f75e0c9dfc0>, <function test_rgb at 0x7f75e0c9e170>, <function test_pbm at 0x7f75e0c9e4d0>, <function test_pgm at 0x7f75e0c9de10>, <function test_ppm at 0x7f75e0c9e950>, <function test_rast at 0x7f75e0c9e290>, <function test_xbm at 0x7f75e0c9e320>, <function test_bmp at 0x7f75e0c9e710>, <function test_webp at 0x7f75e0c9e0e0>, <function test_exr at 0x7f75e0c9e200>]