pnmcat
Concatenate multiple PNM images into one
SYNOPSIS
pnmcat [-lrbt] [pnmfile ...]
PARAMETERS
-l
Concatenate left to right (horizontally). This is the default behavior.
-r
Concatenate right to left (horizontally).
-t
Concatenate top to bottom (vertically).
-b
Concatenate bottom to top (vertically).
pnmfile ...
One or more PNM image files to concatenate. If no files are specified, pnmcat reads from standard input.
DESCRIPTION
The pnmcat command reads one or more PNM (Portable Any Map) image files and concatenates them horizontally or vertically to form a single larger PNM image. The program automatically determines the type (PBM, PGM, PPM) of the images and combines them appropriately. If the input images have differing depths, the resulting image will have the maximum depth of the inputs. When concatenating horizontally, the images must have the same height. Vertically, the images need to have the same width. pnmcat is a powerful tool for assembling multiple images into a single coherent whole, useful for creating animations, mosaics, or simply arranging related images for display or printing.
Note: PNM is a family of simple image formats widely supported by various image processing tools.
EXIT STATUS
pnmcat returns 0 if successful, and a non-zero value if an error occurred (e.g., invalid PNM file, incompatible dimensions).
EXAMPLES
To concatenate three images horizontally:
pnmcat image1.pnm image2.pnm image3.pnm > combined.pnm
To concatenate images vertically:
pnmcat -t image_top.pnm image_bottom.pnm > vertical.pnm
SEE ALSO
pnm(5), pbm(5), pgm(5), ppm(5), pnmdepth(1)