Pnmcat User Manual

# pnmcat

Updated: 30 July 2022

## NAME

pnmcat - replaced by pamcat

## DESCRIPTION

This program is part of Netpbm.

pnmcat was obsoleted by pamcat, introduced with Netpbm 11.00 (September 2022). pamcat is almost backward compatible with pnmcat, plus adds many additional functions, including the ability to process PAM images.

These are the ways in which pamcat is not backward compatible with pnmcat:

- pamcat produces PAM output, whereas pnmcat produces PNM. With pamcat, If your inputs are PNM and you want PNM output, you can run the output through pnmtopnm. But most Netpbm programs that take PNM input can just as well take the PAM input, so this may not be necessary.
- pnmcat recognizes PBM, PGM, and PPM input images as visual images and makes sure the images are the same in the concatenated outputs even though the output may be a different format. For example, if you are concatenating PBM image foo.pbm and PPM image bar.ppm, the resulting image will be PPM and the foo part of it will have the same black and white pixels as the foo.pbm input.

  pamcat, on the other hand, work on generic PAM images and does not really recognize colors. It sees a PBM input as a 1-plane image and a PPM input as a 3-plane image and produces a 3-plane output image. By default, in the example above, the foo part of the output contains the black and white sample values in its first plane, but zeroes in its second and third planes, which means if you take the output image to be a PPM-like color visual image, the foo part is black and red instead of black and white.

  But this is easy to fix. Use the -extendplane option to say instead of making those additional planes zero, make them copies of the first plane. So the three panes in the foo part of the output image will all contain the same sample values as the single plane of the PBM input, which means if you use the output image as a color image, those pixels are black and white.

For full backward compatibility, pnmcat remains in Netpbm, implemented as a simple wrapper of pamcat. For the fewest problems with future releases of Netpbm, you should not use pnmcat in any new work.

## Using pnmcat in old Netpbm

In Netpbm before 11.00, use the manual for pamcat with pnmcat, observing the following differences:

- pnmcat accepts only PNM input (i.e. PBM, PGM, or PPM) and produces only PNM output. The output is the highest format (PBM, PGM, PPM) of any of its inputs.
- Features that the manual says were added to pamcat in Release 11.00 or later are not there.