PNM -- Netpbm (.pgm, .ppm)

Driver short name


Driver built-in by default

This driver is built-in by default

GDAL includes support for reading, and creating .pgm (greyscale), and .ppm (RGB color) files compatible with the Netpbm tools. Only the binary (raw) formats are supported.

Netpbm files can be created with a type of PNM.

Creation Options

Creation options can be specified in command-line tools using the syntax -co <NAME>=<VALUE> or by providing the appropriate arguments to GDALCreate() (C) or Driver.Create (Python). The following creation option is available:

  • MAXVAL=<n>: Force setting the maximum color value to n in the output PNM file. May be useful if you planning to use the output files with software which is not liberal to this value.

NOTE: Implemented as pnmdataset.cpp.

Driver capabilities

Supports Create()

This driver supports the GDALDriver::Create() operation

Supports CreateCopy()

This driver supports the GDALDriver::CreateCopy() operation

Supports VirtualIO

This driver supports virtual I/O operations (/vsimem/, etc.)