| 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 "Pamstack User Manual" 1 "18 May 2023" "netpbm documentation" |
| 7 |
|
| 8 |
.SH NAME |
| 9 |
pamstack - stack planes of multiple PAM images into one PAM image |
| 10 |
|
| 11 |
.UN synopsis |
| 12 |
.SH SYNOPSIS |
| 13 |
|
| 14 |
\fBpamstack\fP |
| 15 |
[\fB-tupletype \fP\fItupletype\fP] |
| 16 |
[\fB-firstmaxval\fP,\fB-lcmmaxval\fP] |
| 17 |
[\fIinputfilespec\fP ...] |
| 18 |
.PP |
| 19 |
All options may be abbreviated to the shortest unique prefix. You |
| 20 |
may use two hyphens instead of one. You may separate an option from |
| 21 |
its value with a space instead of \fB=\fP. |
| 22 |
|
| 23 |
.UN description |
| 24 |
.SH DESCRIPTION |
| 25 |
.PP |
| 26 |
This program is part of |
| 27 |
.BR "Netpbm" (1)\c |
| 28 |
\&. |
| 29 |
.PP |
| 30 |
\fBpamstack\fP reads multiple PAM or PNM images as input and |
| 31 |
produces a PAM image as output, consisting of all the planes |
| 32 |
(channels) of the inputs, stacked in the order specified. |
| 33 |
.PP |
| 34 |
It can also just change the tuple type of a single PAM image. |
| 35 |
|
| 36 |
.PP |
| 37 |
For any one (but not more) of the input files, you may specify "-" to mean |
| 38 |
Standard Input. If you specify no arguments at all, the input is one file: |
| 39 |
Standard Input. |
| 40 |
.PP |
| 41 |
The output is the same dimensions as the inputs, except that the depth is |
| 42 |
the sum of the depths of the inputs. The maxval is the same as the inputs |
| 43 |
if they are all alike, and controlled by \fB-firstmaxval\fP |
| 44 |
and \fB-lcmmaxval\fP if not. The tuple type is a null string unless you |
| 45 |
specify the \fB-tupletype\fP option. |
| 46 |
|
| 47 |
.PP |
| 48 |
\fBpamstack\fP fails if the inputs are not all the same width and height. |
| 49 |
It also fails if they do not all have the same maxval, unless you specify |
| 50 |
\fB-firstmaxval\fP or \fB-lcmmaxval\fP. |
| 51 |
.PP |
| 52 |
\fBpamstack\fP works with multi-image streams. It stacks the 1st |
| 53 |
image in all the streams into one output image (the first one in the |
| 54 |
output stream), then stacks the 2nd image in all the streams into the |
| 55 |
2nd image in the output stream, and so on, until one of the streams |
| 56 |
runs dry. It's like a matrix operation. |
| 57 |
.PP |
| 58 |
Before Netpbm 10.32 (February 2006), \fBpamstack\fP ignored all but |
| 59 |
the first image in each input stream. |
| 60 |
.PP |
| 61 |
\fBpamchannel\fP does the opposite of \fBpamstack\fP: It extracts |
| 62 |
individual planes from a single PAM. |
| 63 |
.PP |
| 64 |
Use |
| 65 |
.BR "pamtopnm" (1)\c |
| 66 |
\& to convert a suitable PAM |
| 67 |
image to a more traditional PNM (PBM, PGM, or PPM) image. (But there's |
| 68 |
no need to do that if you're going to feed it to a modern Netpbm program -- |
| 69 |
they all take suitable PAM input directly). |
| 70 |
.PP |
| 71 |
One example of using \fBpamstack\fP is that some Netpbm programs |
| 72 |
accept as input a PAM that represents graphic image with transparency |
| 73 |
information. Taking a color image for example, this would be a PAM |
| 74 |
with tuple type "RGB_ALPHA". In Netpbm, such images were |
| 75 |
traditionally represented as two images - a PPM for the color and a |
| 76 |
PGM for the transparency. To convert a PPM/PGM pair into |
| 77 |
PAM(RGB_ALPHA) input that newer programs require, do something like |
| 78 |
this: |
| 79 |
|
| 80 |
.nf |
| 81 |
\f(CW |
| 82 |
$ pamstack -tupletype=RGB_ALPHA myimage.ppm myalpha.pgm | \e |
| 83 |
pamtouil >myimage.uil |
| 84 |
\fP |
| 85 |
|
| 86 |
.fi |
| 87 |
|
| 88 |
.UN options |
| 89 |
.SH OPTIONS |
| 90 |
.PP |
| 91 |
In addition to the options common to all programs based on libnetpbm |
| 92 |
(most notably \fB-quiet\fP, see |
| 93 |
.UR index.html#commonoptions |
| 94 |
Common Options |
| 95 |
.UE |
| 96 |
\&), \fBpamstack\fP recognizes the following |
| 97 |
command line option: |
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
.TP |
| 102 |
\fB-tupletype \fP\fItupletype\fP |
| 103 |
This specifies the tuple type name to be recorded in the output. You may |
| 104 |
use any string up to 255 characters. Some programs recognize some names. |
| 105 |
If you omit this option, the default tuple type name is null. |
| 106 |
|
| 107 |
.TP |
| 108 |
\fB-firstmaxval\fP |
| 109 |
This says to make the maxval of the output the same as the maxval of the first |
| 110 |
image of the input; the program scales sample values of other images are as |
| 111 |
necessary. |
| 112 |
.sp |
| 113 |
By default, \fBpamstack\fP requires all the input images to have the same |
| 114 |
maxval. If they don't, it fails. |
| 115 |
.sp |
| 116 |
You cannot specify this with \fB-lcmmaxval\fP. |
| 117 |
.sp |
| 118 |
This option was new in Netpbm 11.03 (June 2023). |
| 119 |
|
| 120 |
.TP |
| 121 |
\fB-lcmmaxval\fP |
| 122 |
This says to make the maxval of the output the least common multiple of the |
| 123 |
maxvals of the input images, limited to 65535 if the LCM is above that; the |
| 124 |
program scales sample values of other images are as necessary. |
| 125 |
.sp |
| 126 |
By default, \fBpamstack\fP requires all the input images to have the same |
| 127 |
maxval. If they don't, it fails. |
| 128 |
.sp |
| 129 |
You cannot specify this with \fB-firstmaxval\fP. |
| 130 |
.sp |
| 131 |
This option was new in Netpbm 11.03 (June 2023). |
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
.UN seealso |
| 136 |
.SH SEE ALSO |
| 137 |
.BR "pam" (1)\c |
| 138 |
\& |
| 139 |
.BR "pamchannel" (1)\c |
| 140 |
\& |
| 141 |
|
| 142 |
.UN history |
| 143 |
.SH HISTORY |
| 144 |
.PP |
| 145 |
\fBpamstack\fP was new in Netpbm 10.0 (June 2002). |
| 146 |
.SH DOCUMENT SOURCE |
| 147 |
This manual page was generated by the Netpbm tool 'makeman' from HTML |
| 148 |
source. The master documentation is at |
| 149 |
.IP |
| 150 |
.B http://netpbm.sourceforge.net/doc/pamstack.html |
| 151 |
.PP |