| 1 |
\ |
| 2 |
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source. |
| 3 |
.\" Do not hand-hack it! If you have bug fixes or improvements, please find |
| 4 |
.\" the corresponding HTML page on the Netpbm website, generate a patch |
| 5 |
.\" against that, and send it to the Netpbm maintainer. |
| 6 |
.TH "Pamrestack User Manual" 1 "" "netpbm documentation" |
| 7 |
|
| 8 |
Updated: |
| 9 |
.SH NAME |
| 10 |
pamrestack - Rearrange rows of a Netpbm image |
| 11 |
|
| 12 |
.UN synopsis |
| 13 |
.SH SYNOPSIS |
| 14 |
|
| 15 |
\fBpamrestack\fP |
| 16 |
|
| 17 |
[\fB-width=\fP\fIwidth\fP] |
| 18 |
|
| 19 |
[\fB-trim=\fP{\fBfill\fP|\fBcrop\fP|\fBabort\fP}] |
| 20 |
|
| 21 |
[\fB-verbose\fP] |
| 22 |
|
| 23 |
[\fIpamfile\fP] |
| 24 |
.PP |
| 25 |
Minimum unique abbreviations of option are acceptable. You may use |
| 26 |
double hyphens instead of single hyphen to denote options. You may use |
| 27 |
white space in place of the equals sign to separate an option name |
| 28 |
from its value. |
| 29 |
|
| 30 |
.UN description |
| 31 |
.SH DESCRIPTION |
| 32 |
.PP |
| 33 |
This program is part of |
| 34 |
.BR "Netpbm" (1)\c |
| 35 |
\&. |
| 36 |
.PP |
| 37 |
\fBpamrestack\fP rearranges the pixels of a Netpbm image into different |
| 38 |
size rows. E.g. if an image is 100 pixels wide and 50 pixels high, you can |
| 39 |
rearrange it to 125 wide and 40 high. In that case, 25 pixels from the start |
| 40 |
of the 2nd row of the input would be moved to the end of the 1st row of input, |
| 41 |
50 pixels from the 3rd row would be moved to the 2nd row, etc. |
| 42 |
.PP |
| 43 |
Put another way, \fBpamrestack\fP arranges all the input rows into one |
| 44 |
long sequence and produces output rows therefrom, in FIFO order. |
| 45 |
.PP |
| 46 |
Input is from Standard Input if you don't specify the input |
| 47 |
file \fIpamfile\fP. |
| 48 |
.PP |
| 49 |
Output is to Standard Output. |
| 50 |
.PP |
| 51 |
\fBpamrestack\fP works on a multi-image stream. It cuts each image in the |
| 52 |
stream independently and produces a multi-image stream output. |
| 53 |
|
| 54 |
|
| 55 |
.UN options |
| 56 |
.SH OPTIONS |
| 57 |
.PP |
| 58 |
In addition to the options common to all programs based on libnetpbm |
| 59 |
(most notably \fB-quiet\fP, see |
| 60 |
.UR index.html#commonoptions |
| 61 |
Common Options |
| 62 |
.UE |
| 63 |
\&), \fBpamrestack\fP recognizes the following |
| 64 |
command line options: |
| 65 |
|
| 66 |
|
| 67 |
.TP |
| 68 |
\fB-width=\fP\fIwidth\fP |
| 69 |
The width of the output. If this option is not specified, the output will |
| 70 |
consist of a single row wide enough to contain all the pixels of the input |
| 71 |
image. |
| 72 |
|
| 73 |
.TP |
| 74 |
\fB-trim=\fP{\fBfill\fP|\fBcrop\fP|\fBabort\fP} |
| 75 |
This option specifies what to do when the new width does not cleanly |
| 76 |
divide the number of pixels in the input image. |
| 77 |
|
| 78 |
|
| 79 |
.TP |
| 80 |
\fBfill\fP |
| 81 |
|
| 82 |
(Default) Complete the final row by adding black pixels as necessary. |
| 83 |
|
| 84 |
.TP |
| 85 |
\fBcrop\fP |
| 86 |
|
| 87 |
Discard the final partial row. If this means there is nothing to |
| 88 |
output, fail the program. |
| 89 |
|
| 90 |
.TP |
| 91 |
\fBabort\fP |
| 92 |
|
| 93 |
Fail the program. |
| 94 |
|
| 95 |
|
| 96 |
.TP |
| 97 |
\fB-verbose\fP |
| 98 |
Print information about the processing to Standard Error. |
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
.UN usage |
| 103 |
.SH USAGE |
| 104 |
.PP |
| 105 |
\fBpamrestack\fP is a general editor with many possible uses. |
| 106 |
|
| 107 |
.IP \(bu |
| 108 |
\fBpamrestack\fP can rearrange into rectangles single-dimension images |
| 109 |
produced by programs such as \fBppmhist\fP and \fBpamseq\fP. This makes |
| 110 |
the output easier to examine with a viewer. Conversely, \fBpamrestack\fP |
| 111 |
can be used to convert a normal rectangular image into one wide row or one |
| 112 |
tall column if that is desirable for compression, conversion, or analysis. |
| 113 |
|
| 114 |
.IP \(bu |
| 115 |
\fBpamrestack\fP can repair images corrupted by an incorrect width value |
| 116 |
in the header. Images grabbed from the framebuffer device often exhibit |
| 117 |
this problem. |
| 118 |
|
| 119 |
.IP \(bu |
| 120 |
\fBpamrestack\fP can be used with \fBpamdice\fP, \fBpamundice\fP, |
| 121 |
\fBpamcat\fP, etc. to divide and combine images in the process of |
| 122 |
interlacing. |
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
.UN examples |
| 127 |
.SH EXAMPLES |
| 128 |
|
| 129 |
|
| 130 |
.IP \(bu |
| 131 |
Rearrange the one-dimensional output of \fBpamseq\fP into a square: |
| 132 |
|
| 133 |
.nf |
| 134 |
\f(CW |
| 135 |
pamseq 3 255 | pamrestack -width=4096 |
| 136 |
\fP |
| 137 |
|
| 138 |
.fi |
| 139 |
|
| 140 |
.IP \(bu |
| 141 |
Combine two files, each 600 pixels wide, one with the odd rows and |
| 142 |
another with the even rows, to construct an interlaced image: |
| 143 |
|
| 144 |
.nf |
| 145 |
\f(CW |
| 146 |
pamcat -leftright oddrows.ppm evenrows.ppm | pamrestack -width=600 |
| 147 |
\fP |
| 148 |
|
| 149 |
.fi |
| 150 |
|
| 151 |
|
| 152 |
.IP \(bu |
| 153 |
Like the above, but invert all pixels in the even rows left to right |
| 154 |
to produce a serpentine interlace: |
| 155 |
|
| 156 |
.nf |
| 157 |
\f(CW |
| 158 |
pamflip -leftright evenrows.ppm | |
| 159 |
pamcat -leftright oddrows.ppm - | |
| 160 |
pamrestack -width 600 |
| 161 |
\fP |
| 162 |
|
| 163 |
.fi |
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
.UN seealso |
| 168 |
.SH SEE ALSO |
| 169 |
.BR "pamseq" (1)\c |
| 170 |
\&, |
| 171 |
.BR "ppmhist" (1)\c |
| 172 |
\&, |
| 173 |
.BR "pnmshear" (1)\c |
| 174 |
\&, |
| 175 |
.BR "pamscale" (1)\c |
| 176 |
\&, |
| 177 |
.BR "pamdeinterlace" (1)\c |
| 178 |
\&, |
| 179 |
.BR "pamdice" (1)\c |
| 180 |
\&, |
| 181 |
.BR "pamundice" (1)\c |
| 182 |
\&, |
| 183 |
.BR "pamcat" (1)\c |
| 184 |
\&, |
| 185 |
.BR "pam" (1)\c |
| 186 |
\& |
| 187 |
|
| 188 |
|
| 189 |
.UN history |
| 190 |
.SH HISTORY |
| 191 |
.PP |
| 192 |
\fBpamrestack\fP was new in Netpbm 10.99 (June 2022). |
| 193 |
|
| 194 |
|
| 195 |
.UN author |
| 196 |
.SH AUTHOR |
| 197 |
|
| 198 |
By Akira F. Urushibata. Contributed to the public domain by the author. |
| 199 |
.SH DOCUMENT SOURCE |
| 200 |
This manual page was generated by the Netpbm tool 'makeman' from HTML |
| 201 |
source. The master documentation is at |
| 202 |
.IP |
| 203 |
.B http://netpbm.sourceforge.net/doc/pamrestack.html |
| 204 |
.PP |