pnmsplit
Updated: 19 June 2000
Table Of Contents
NAME
pnmsplit - split a multi-image PNM file into multiple single-
image files
SYNOPSIS
pnmsplit [pnmfile[ output_file_pattern]] [-padname=n]
Minimum unique abbreviation of option is acceptable. You may
use double
hypens instead of single hyphen to denote options. You may use
white space
in place of the equals sign to separate an option name from
its value.
DESCRIPTION
This program is part of Netpbm.
pnmsplit reads a PNM stream as input. It copies each image in
the input into
a separate file, in the same format.
pnmfile is the file specification of the input file, or - to
indicate
Standard Input. The default is Standard Input.
output_file_pattern tells how to name the output files. It is
the file
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
decimal, with
the sequence starting at 0. If there is no "%d" in the pat-
tern, pnmsplit
fails.
The default output file pattern is "image%d".
The -padname option specifies to how many characters you want
the image
sequence number in the output file name padded with zeroes.
pnmpslit adds
leading zeroes to the image sequence number to get up to at
least that
number of characters. This is just the number of characters in
the sequence
number part of the name. For example, pnmsplit - output-
file%d.ppm -padname=3
would yield output filenames outputfile000.ppm, output-
file001.ppm, etc.
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-
gle-image PNM
files into a multi-image one), there is no special Netpbm pro-
gram. Just use
cat.
SEE ALSO
pnm, cat man page
_________________________________________________________________
Table Of Contents
* NAME
* SYNOPSIS
* DESCRIPTION
* SEE ALSO
UNIX/Linux commands referenced on this page:
- split
- file
- as
- pnmfile
- at
- cat
- man