++ed by:
MARKELLIS FANY MARKSTOS AWNCORP TONYC

32 PAUSE users
18 non-PAUSE users.

Tony Cook

NAME

pnm.c - implements reading and writing ppm/pnm/pbm files, uses io layer.

SYNOPSIS

   io_glue *ig = io_new_fd( fd );
   i_img *im   = i_readpnm_wiol(ig, 0); // no limit on how much is read
   // or 
   io_glue *ig = io_new_fd( fd );
   return_code = i_writepnm_wiol(im, ig); 

DESCRIPTION

pnm.c implements the basic functions to read and write portable anymap files. It uses the iolayer and needs either a seekable source or an entire memory mapped buffer.

FUNCTION REFERENCE

Some of these functions are internal.

skip_spaces(ig)

Advances in stream until it is positioned at a non white space character. (internal)

   ig - io_glue
skip_comment(ig)

Advances in stream over whitespace and a comment if one is found. (internal)

   ig - io_glue object
gnum(mb, i)

Fetches the next number from stream and stores in i, returns true on success else false.

   mb - buffer object
   i  - integer to store result in
i_readpnm_wiol(ig, allow_incomplete)

Retrieve an image and stores in the iolayer object. Returns NULL on fatal error.

   ig     - io_glue object
   allow_incomplete - allows a partial file to be read successfully

AUTHOR

Arnar M. Hrafnkelsson <addi@umich.edu>, Tony Cook <tonyc@cpan.org>, Philip Gwyn <gwyn@cpan.org>.

SEE ALSO

Imager(3)