summary refs log tree commit diff
path: root/pamsplit.html
blob: 489f8f4e300e0dee50e52ff63983175d42191e36 (plain) (blame)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
<html><head><title>Pamsplit User Manual</title></head>
<body>
<h1>pamsplit</h1>
Updated: 11 August 2011
<br>
<a href="#index">Table Of Contents</a>

<h2>NAME</h2>

pamsplit - split a multi-image Netpbm file into single-image files

<h2 id="synopsis">SYNOPSIS</h2>

<b>pamsplit</b>

[<i>netpbmfile</i>

[<i> output_file_pattern</i>]]

[<b>-padname=</b><i>n</i>]

<p>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.


<h2 id="description">DESCRIPTION</h2>

<p>This program is part of <a href="index.html">Netpbm</a>.

<p><b>pamsplit</b> reads a PNM or PAM stream as input.  It copies each image
in the input into a separate file, in the same format.

<p><i>netpbmfile</i> is the file name of the input file, or
<b>-</b> to indicate Standard Input.  The default is Standard Input.

<p><i>output_file_pattern</i> 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, <b>pamsplit</b> fails.

<p>The default output file pattern is "image%d".

<p>The <b>-padname</b> option specifies how many characters you
want the image sequence number in the output file name padded with
zeroes.  <b>pamsplit</b> 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, <kbd>pamsplit - outputfile%d.ppm -padname=3</kbd> would yield
output filenames <b>outputfile000.ppm</b>, <b>outputfile001.ppm</b>,
etc.


<p>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 <b>cat</b>.

<p>If you just want to find out basic information about the images in a
stream, you can use <b>pamfile</b> on the stream.

<p>To extract images from a stream and generate a single stream containing
them, use <b>pampick</b>.

<p>To run a program on each image in a stream without the hassle of temporary
files, use <b>pamexec</b>.


<h2 id="options">OPTIONS</h2>

<p>In addition to the options common to all programs based on libnetpbm
(most notably <b>-quiet</b>, see <a href="index.html#commonoptions">
Common Options</a>), <b>pamsplit</b> recognizes the following
command line option:

<dl compact>
<dt><b>-padname=</b><i>n</i>

<dd>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.

<p>The default is no padding (equivalent to <b>-padname=0</b>).

<p>The <b>-padname</b> option was new in Netpbm 10.23 (July 2004).
Before that, there was never any padding.

</dl>

<h2 id="seealso">SEE ALSO</h2>

<b><a href="pamfile.html">pamfile</a></b>,
<b><a href="pampick.html">pampick</a></b>,
<b><a href="pamexec.html">pamexec</a></b>,
<b><a href="pnm.html">pnm</a></b>,
<b><a href="pam.html">pam</a></b>,
<b>cat</b> man page

<hr>
<h2 id="index">Table Of Contents</h2>
<ul>
<li><a href="#synopsis">SYNOPSIS</a>
<li><a href="#description">DESCRIPTION</a>
<li><a href="#options">OPTIONS</a>
<li><a href="#seealso">SEE ALSO</a>
</ul>
</body>
</html>