DOKK / manpages / debian 12 / netpbm / pamvalidate.1.en
Pamvalidate User Manual(1) General Commands Manual Pamvalidate User Manual(1)

pamvalidate - validate Netpbm image format

pamvalidate

This program is part of Netpbm(1).

pamvalidate copies a Netpbm image from Standard Input to Standard Output, except that if there are certain violations of the image format in the input, pamvalidate fails without producing any output.

This is most useful in a pipeline, before a stage you don't want to start working on Netpbm input until it knows it can get all the way through it. For example, assume you are converting PPM images to PNG and you don't want to produce a partial PNG file under any circumstance. If you just use pnmtopng, and the PPM input is truncated halfway through the raster, pnmtopng fails, but also produces about half of a PNG file. To prevent that, pass your PPM input through pamvalidate on its way to pnmtopng. Then, pamvalidate will fail, and consequently the pipeline will fail, before pnmtopng has seen any input and therefore before pnmtopng has produced any output.

These are the kinds of format violations pamvalidate detects:

  • A purported sample value exceeds the declared maxval.
  • The stream ends prematurely.

This program works on multi-image streams, producing a corresponding output stream.

See pamfix for a way to salvage an invalid Netpbm image stream.

There are no command line options defined specifically for pamvalidate, but it recognizes the options common to all programs based on libnetpbm (See
Common Options
.)

pam(1) pnm(1) pamfix(1)

pamvalidate was new in Netpbm 10.66 (March 2014).

This manual page was generated by the Netpbm tool 'makeman' from HTML source. The master documentation is at

http://netpbm.sourceforge.net/doc/pamvalidate.html
22 March 2014 netpbm documentation