\ .\" This man page was generated by the Netpbm tool 'makeman' from HTML source. .\" Do not hand-hack it! If you have bug fixes or improvements, please find .\" the corresponding HTML page on the Netpbm website, generate a patch .\" against that, and send it to the Netpbm maintainer. .TH "Pamsplit User Manual" 1 "11 August 2011" "netpbm documentation" .SH NAME pamsplit - split a multi-image Netpbm file into single-image files .UN synopsis .SH SYNOPSIS \fBpamsplit\fP [\fInetpbmfile\fP [\fI output_file_pattern\fP]] [\fB-padname=\fP\fIn\fP] .PP Minimum unique abbreviation of option is acceptable. You may use double 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 its value. .UN description .SH DESCRIPTION .PP This program is part of .BR "Netpbm" (1)\c \&. .PP \fBpamsplit\fP reads a PNM or PAM stream as input. It copies each image in the input into a separate file, in the same format. .PP \fInetpbmfile\fP is the file name of the input file, or \fB-\fP to indicate Standard Input. The default is Standard Input. .PP \fIoutput_file_pattern\fP tells how to name the output files. It is the file name of the output file, except that the first occurrence 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 pattern, \fBpamsplit\fP fails. .PP The default output file pattern is "image%d". .PP The \fB-padname\fP option specifies how many characters you want the image sequence number in the output file name padded with zeroes. \fBpamsplit\fP 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, \f(CWpamsplit - outputfile%d.ppm -padname=3\fP would yield output filenames \fBoutputfile000.ppm\fP, \fBoutputfile001.ppm\fP, etc. .PP Note that to do the reverse operation (combining multiple single-image Netpbm files into a multi-image one), there is no special Netpbm program. Just use \fBcat\fP. .PP If you just want to find out basic information about the images in a stream, you can use \fBpamfile\fP on the stream. .PP To extract images from a stream and generate a single stream containing them, use \fBpampick\fP. .PP To run a program on each image in a stream without the hassle of temporary files, use \fBpamexec\fP. .UN options .SH OPTIONS .PP In addition to the options common to all programs based on libnetpbm (most notably \fB-quiet\fP, see .UR index.html#commonoptions Common Options .UE \&), \fBpamsplit\fP recognizes the following command line option: .TP \fB-padname=\fP\fIn\fP Specify the width (i.e. number of digits) of the image sequence number field in the filenames of the output files. The image sequence will be padded with leading zeroes to achieve the stated width. .sp The default is no padding (equivalent to \fB-padname=0\fP). .sp The \fB-padname\fP option was new in Netpbm 10.23 (July 2004). Before that, there was never any padding. .UN seealso .SH SEE ALSO .BR "pamfile" (1)\c \&, .BR "pampick" (1)\c \&, .BR "pamexec" (1)\c \&, .BR "pnm" (1)\c \&, .BR "pam" (1)\c \&, \fBcat\fP man page .SH DOCUMENT SOURCE This manual page was generated by the Netpbm tool 'makeman' from HTML source. The master documentation is at .IP .B http://netpbm.sourceforge.net/doc/pamsplit.html .PP