| 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 "Pammixmulti User Manual" 1 "18 December 2024" "netpbm documentation" |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
.SH NAME |
| 11 |
.PP |
| 12 |
pammixmulti - blend together multiple PAM images |
| 13 |
|
| 14 |
|
| 15 |
.UN synopsis |
| 16 |
.SH SYNOPSIS |
| 17 |
.PP |
| 18 |
\fBpammixmulti\fP |
| 19 |
[\fB-blend\fP=average|alpha-weighted|random|mask] |
| 20 |
[\fB-maskfile\fP=\fIfilename\fP] |
| 21 |
[\fB-stdev\fP=\fInumber\fP] |
| 22 |
[\fB-randomseed\fP \fIinteger\fP] |
| 23 |
\fIfilename\fP ... |
| 24 |
.PP |
| 25 |
Minimum unique abbreviation of an option is acceptable. You can use double |
| 26 |
hyphen instead of a single hyphen to denote options. You can use white |
| 27 |
space in place of the equals sign to separate an option name from its |
| 28 |
value. |
| 29 |
|
| 30 |
|
| 31 |
.UN description |
| 32 |
.SH DESCRIPTION |
| 33 |
.PP |
| 34 |
This file is part of |
| 35 |
.BR "Netpbm" (1)\c |
| 36 |
\&. |
| 37 |
.PP |
| 38 |
\fBpammixmulti\fP mixes two or more images to produce a new image. The |
| 39 |
program provides multiple ways to interpret "mix." |
| 40 |
|
| 41 |
|
| 42 |
.UN options |
| 43 |
.SH OPTIONS |
| 44 |
.PP |
| 45 |
In addition to the options common to all programs based on libnetpbm |
| 46 |
(most notably \fB-quiet\fP, see |
| 47 |
.UR index.html#commonoptions |
| 48 |
Common Options |
| 49 |
.UE |
| 50 |
\&), \fBpammixmulti\fP recognizes the following |
| 51 |
command line options: |
| 52 |
|
| 53 |
|
| 54 |
.TP |
| 55 |
\fB-blend\fP=average|alpha-weighted|random|mask |
| 56 |
.sp |
| 57 |
This option specifies how the input images should be mixed to |
| 58 |
produce the output image. With \fB-blend\fP=\f(CWaverage\fP |
| 59 |
(the default), each pixel in the output is produced by averaging the |
| 60 |
corresponding pixels from all the input images. With |
| 61 |
\fB-blend\fP=\f(CWalpha-weighted\fP, each pixel in the output |
| 62 |
is produced by taking a weighted average of the corresponding pixels |
| 63 |
from all the input images, using each pixel's alpha (opaqueness) level |
| 64 |
as its weight. With \fB-blend\fP=\f(CWrandom\fP, each pixel in |
| 65 |
the output is produced by selecting the corresponding pixel from one |
| 66 |
of the input images, chosen at random on a per-pixel basis. |
| 67 |
With \fB-blend\fP=\f(CWmask\fP, each pixel in the output is |
| 68 |
produced by a weighted average of the corresponding pixels from all |
| 69 |
the input images based on the grayscale level of an additional mask |
| 70 |
image. |
| 71 |
.sp |
| 72 |
\fB-alpha-weighted\fP was new in Netpbm 11.09 (December 2024). |
| 73 |
|
| 74 |
|
| 75 |
.TP |
| 76 |
\fB-maskfile\fP=\fIfilename\fP |
| 77 |
.sp |
| 78 |
In conjunction with \fB-blend\fP=\f(CWmask\fP, this option names a |
| 79 |
grayscale mask file to control the blending of each pixel. (If the file is |
| 80 |
not grayscale, the first channel is treated as gray). Where the mask file is |
| 81 |
black, the first image is selected. Where the mask file is white, the last |
| 82 |
image is selected. Intermediate levels of gray select intermediate |
| 83 |
images. |
| 84 |
|
| 85 |
|
| 86 |
.TP |
| 87 |
\fB-stdev\fP=\fInumber\fP |
| 88 |
.sp |
| 89 |
When used with \fB-blend\fP=\f(CWmask\fP, this option controls how |
| 90 |
smoothly the various input images are mixed to produce each output pixel. For |
| 91 |
example, consider running \fBpammixmulti\fP with three input images and a |
| 92 |
mask image that uses gray levels from 0 to 255. Given \fB-stdev\fP=0.0, gray |
| 93 |
levels 0-84 produce exclusively image 1; gray levels 85-170 produce |
| 94 |
exclusively image 2; and gray levels 171-255 produce exclusively image 3. If |
| 95 |
the argument to \fB-stdev\fP is positive, images are blended according to a |
| 96 |
normal distribution. Hence, gray levels around 85 produce an output pixel |
| 97 |
that includes roughly equal amounts of the corresponding pixel from images 1 |
| 98 |
and 2 but less of the corresponding pixel from image 3. As \fInumber\fP |
| 99 |
tends towards the number of input images (going beyond that has diminishing |
| 100 |
impact), the output tends to look more |
| 101 |
like \fB-blend\fP=average. \fInumber\fP defaults to 0.25. |
| 102 |
|
| 103 |
|
| 104 |
.TP |
| 105 |
\fB-randomseed\fP \fIinteger\fP |
| 106 |
This is the seed for the random number generator used with |
| 107 |
\fB-blend=random\fP |
| 108 |
.sp |
| 109 |
Use this to ensure you get the same image on separate invocations. |
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
.UN arguments |
| 114 |
.SH ARGUMENTS |
| 115 |
.PP |
| 116 |
You supply the names of the files to mix as non-option arguments. |
| 117 |
|
| 118 |
|
| 119 |
.UN examples |
| 120 |
.SH EXAMPLES |
| 121 |
.PP |
| 122 |
Average a bunch of PPM images to produce a new PAM image: |
| 123 |
.nf\f(CW |
| 124 |
pammixmulti input*.ppm >output.ppm |
| 125 |
\fP |
| 126 |
.fi |
| 127 |
.PP |
| 128 |
Mix these same images by taking each pixel from a randomly selected input |
| 129 |
image: |
| 130 |
|
| 131 |
.nf\f(CW |
| 132 |
pammixmulti -blend=random input*.ppm >output.ppm |
| 133 |
\fP |
| 134 |
.fi |
| 135 |
.PP |
| 136 |
Use a mask image to control the fading among input images on a |
| 137 |
pixel-by-pixel basis: |
| 138 |
|
| 139 |
.nf\f(CW |
| 140 |
pammixmulti -blend=mask -maskfile=mask.pgm >output.pam \e |
| 141 |
one.pam two.pam three.pam four.pam |
| 142 |
\fP |
| 143 |
.fi |
| 144 |
.PP |
| 145 |
Do the same but with more abrupt transitions: |
| 146 |
|
| 147 |
.nf\f(CW |
| 148 |
pammixmulti -blend=mask -maskfile=mask.pgm -stdev=0.0 >output.pam \e |
| 149 |
one.pam two.pam three.pam four.pam |
| 150 |
\fP |
| 151 |
.fi |
| 152 |
.PP |
| 153 |
and now with more gradual transitions: |
| 154 |
|
| 155 |
.nf\f(CW |
| 156 |
pammixmulti -blend=mask -maskfile=mask.pgm -stdev=1.0 >output.pam \e |
| 157 |
one.pam two.pam three.pam four.pam |
| 158 |
\fP |
| 159 |
.fi |
| 160 |
|
| 161 |
|
| 162 |
.UN history |
| 163 |
.SH HISTORY |
| 164 |
.PP |
| 165 |
\fBpammixmulti\fP was new in Netpbm 10.85 (December 2018). |
| 166 |
|
| 167 |
|
| 168 |
.UN author |
| 169 |
.SH AUTHOR |
| 170 |
.PP |
| 171 |
Copyright 2018–2024 Scott Pakin, [email protected]. |
| 172 |
|
| 173 |
.UN seealso |
| 174 |
.SH SEE ALSO |
| 175 |
.PP |
| 176 |
.BR "pamcomp" (1)\c |
| 177 |
\&, |
| 178 |
.BR "ppmmix" (1)\c |
| 179 |
\&, |
| 180 |
.BR "pamarith" (1)\c |
| 181 |
\&, |
| 182 |
.BR "pnm" (1)\c |
| 183 |
\&, |
| 184 |
.BR "pam" (1)\c |
| 185 |
\& |
| 186 |
|
| 187 |
|
| 188 |
.UN index |
| 189 |
.SH Table Of Contents |
| 190 |
|
| 191 |
|
| 192 |
.IP \(bu |
| 193 |
.UR #synopsis |
| 194 |
SYNOPSIS |
| 195 |
.UE |
| 196 |
\& |
| 197 |
.IP \(bu |
| 198 |
.UR #description |
| 199 |
DESCRIPTION |
| 200 |
.UE |
| 201 |
\& |
| 202 |
.IP \(bu |
| 203 |
.UR #options |
| 204 |
OPTIONS |
| 205 |
.UE |
| 206 |
\& |
| 207 |
.IP \(bu |
| 208 |
.UR #arguments |
| 209 |
ARGUMENTS |
| 210 |
.UE |
| 211 |
\& |
| 212 |
.IP \(bu |
| 213 |
.UR #examples |
| 214 |
EXAMPLES |
| 215 |
.UE |
| 216 |
\& |
| 217 |
.IP \(bu |
| 218 |
.UR #history |
| 219 |
HISTORY |
| 220 |
.UE |
| 221 |
\& |
| 222 |
.IP \(bu |
| 223 |
.UR #author |
| 224 |
AUTHOR |
| 225 |
.UE |
| 226 |
\& |
| 227 |
.IP \(bu |
| 228 |
.UR #seealso |
| 229 |
SEE ALSO |
| 230 |
.UE |
| 231 |
\& |
| 232 |
.SH DOCUMENT SOURCE |
| 233 |
This manual page was generated by the Netpbm tool 'makeman' from HTML |
| 234 |
source. The master documentation is at |
| 235 |
.IP |
| 236 |
.B http://netpbm.sourceforge.net/doc/pammixmulti.html |
| 237 |
.PP |