PNM Package


Package Name

DvmPnm

Description

Dali supports the PBM/PGM/PPM file formats used by NetPBM.  The format of the files is simple: it starts with a header specifying the type of the file, the width and height and the maximum value of each pixel in the file. The image data then follows the header in either raw binary or ascii format. Only binary PNM files are supported at the moment.

The PnmHdr abstraction stores the header information from a PNM file. It can be created and destroyed as other abstractions, it can be parsed, encoded, or copied. Other operations such as skip, find, and dump do not apply to PNM files.

The body of PNM files can be parsed into BitImage or ByteImage. Dali also supports casting to convert a BitStream into ByteImage and BitImage directly. (Except for PPM files where casting is currently not supported).

Detailed Specification

Tcl specification
C API specification

Dependencies

Needs DvmBasic

Example

Reading and Writing a PPM and PGM file. [ tcl | C ]


Last Updated :

Copyright © 1997-1998 by Cornell University. See the file license.txt for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.