1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
\
.\" 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" 0 "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
|