Debian Codegraph @

upstream/fedora-44/man1/pammixmulti.1

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