The string path must name a portable bitmap graphics file.
pnm:type-dimensions returns a list of 4 items:
The current set of file-type symbols is:
Black-and-White image; pixel values are 0 or 1.
Gray (monochrome) image; pixel values are from 0 to maxval specified in file header.
RGB (full color) image; red, green, and blue interleaved pixel values are from 0 to maxval
Reads the portable bitmap graphics file named by path into array. array must be the correct size and type for path. array is returned.
pnm:image-file->array creates and returns an array with the
portable bitmap graphics file named by path read into it.
Writes the contents of array to a type image file named path. The file will have pixel values between 0 and maxval, which must be compatible with type. For ‘pbm’ files, maxval must be ‘1’. comments are included in the file header.