1Pamrestack User Manual(0) Pamrestack User Manual(0)
2
3
4
5Updated:
6
8 pamrestack - Rearrange rows of a Netpbm image
9
10
12 pamrestack
13
14 [-width=width]
15
16 [-trim={fill|crop|abort}]
17
18 [-verbose]
19
20 [pamfile]
21
22 Minimum unique abbreviations of option are acceptable. You may use
23 double hyphens instead of single hyphen to denote options. You may use
24 white space in place of the equals sign to separate an option name from
25 its value.
26
27
29 This program is part of Netpbm(1).
30
31 pamrestack rearranges the pixels of a Netpbm image into different size
32 rows. E.g. if an image is 100 pixels wide and 50 pixels high, you can
33 rearrange it to 125 wide and 40 high. In that case, 25 pixels from the
34 start of the 2nd row of the input would be moved to the end of the 1st
35 row of input, 50 pixels from the 3rd row would be moved to the 2nd row,
36 etc.
37
38 Put another way, pamrestack arranges all the input rows into one long
39 sequence and produces output rows therefrom, in FIFO order.
40
41 Input is from Standard Input if you don't specify the input file pam‐
42 file.
43
44 Output is to Standard Output.
45
46 pamrestack works on a multi-image stream. It cuts each image in the
47 stream independently and produces a multi-image stream output.
48
49
50
52 In addition to the options common to all programs based on libnetpbm
53 (most notably -quiet, see
54 Common Options ⟨index.html#commonoptions⟩ ), pamrestack recognizes the
55 following command line options:
56
57
58
59 -width=width
60 The width of the output. If this option is not specified, the
61 output will
62 consist of a single row wide enough to contain all the pixels
63 of the input
64 image.
65
66
67 -trim={fill|crop|abort}
68 This option specifies what to do when the new width does not
69 cleanly divide the number of pixels in the input image.
70
71
72
73 fill
74
75 (Default) Complete the final row by adding black pixels as nec‐
76 essary.
77
78
79 crop
80
81 Discard the final partial row. If this means there is nothing
82 to
83 output, fail the program.
84
85
86 abort
87
88 Fail the program..
89
90
91
92 -verbose
93 Print information about the processing to Standard Error.
94
95
96
97
99 pamrestack is a general editor with many possible uses.
100
101
102 •
103
104 pamrestack can rearrange into rectangles single-dimension
105 images
106 produced by programs such as ppmhist and pamseq. This makes
107 the output easier to examine with a viewer. Conversely,
108 pamrestack
109 can be used to convert a normal rectangular image into one
110 wide row or one
111 tall column if that is desirable for compression, conver‐
112 sion, or analysis.
113
114
115 •
116
117 pamrestack can repair images corrupted by an incorrect width
118 value
119 in the header. Images grabbed from the framebuffer device
120 often exhibit
121 this problem.
122
123
124 • pamrestack can be used with pamdice, pamundice,
125 pnmcat, etc. to divide and combine images in the process of
126 interlacing.
127
128
129
130
132 • Rearrange the one-dimensional output of pamseq into a square:
133
134 pamseq 3 255 | pamrestack -width=4096
135
136
137
138 • Combine two files, each 600 pixels wide, one with the odd rows
139 and
140 another with the even rows, to construct an interlaced image:
141
142 pnmcat -leftright oddrows.ppm evenrows.ppm | pamrestack -width=600
143
144
145
146
147 • Like the above, but invert all pixels in the even rows left to
148 right
149 to produce a serpentine interlace:
150
151 pamflip -leftright evenrows.ppm |
152 pnmcat -leftright oddrows.ppm - |
153 pamrestack -width 600
154
155
156
157
158
160 pamseq(1), ppmhist(1), pnmshear(1), pamscale(1), pamdeinterlace(1),
161 pamdice(1), pamundice(1), pnmcat(1), pam(1)
162
163
164
166 pamrestack was new in Netpbm 10.99 (June 2022).
167
168
169
171 By Akira F. Urushibata. Contributed to the public domain by the au‐
172 thor.
173
175 This manual page was generated by the Netpbm tool 'makeman' from HTML
176 source. The master documentation is at
177
178 http://netpbm.sourceforge.net/doc/pamrestack.html
179
180netpbm documentation Pamrestack User Manual(0)