Updated: 23 October 2005
Table Of Contents
pamsplit - split a multi-image PNM/PAM file into single-image
pamsplit [netpbmfile[ output_file_pattern]] [-padname=n]
Minimum unique abbreviation of option is acceptable. You may
hyphens instead of single hyphen to denote options. You may
use white space
in place of the equals sign to separate an option name from
This program is part of Netpbm.
pamsplit reads a PNM or PAM stream as input. It copies each
image in the
input into a separate file, in the same format.
netpbmfile is the file specification of the input file, or -
Standard Input. The default is Standard Input.
output_file_pattern tells how to name the output files. It is
specification of the output file, except that the first oc-
curence of "%d" in
it is replaced by the image sequence number in unpadded ASCII
the sequence starting at 0. If there is no "%d" in the pat-
The default output file pattern is "image%d".
The -padname option specifies to how many characters you want
sequence number in the output file name padded with zeroes.
leading zeroes to the image sequence number to get up to at
number of characters. This is just the number of characters in
number part of the name. For example, pamsplit - output-
would yield output filenames outputfile000.ppm, output-
The default is no padding (equivalent to -padname=0.
The -padname option was new in Netpbm 10.23 (July 2004). Be-
fore that, there
was never any padding.
Note that to do the reverse operation (combining multiple sin-
Netpbm files into a multi-image one), there is no special
Just use cat.
If you just want to find out basic information about the im-
ages in a stream,
you can use pamfile on the stream.
To extract images from a stream and generate a single stream
them, use pampick.
pamfile, pampick, pnm, pam, cat man page
Table Of Contents
* SEE ALSO
Man(1) output converted with