Defined in pyglet.extlibs.png
Read a PNM header, returning (format,width,height,depth,maxval). width and height are in pixels. depth is the number of channels in the image; for PBM and PGM it is synthesized as 1, for PPM as 3; for PAM images it is read from the header. maxval is synthesized (as 1) for PBM images.