Debian Codegraph @

userguide/pampaintspill.html

raw
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
2 <html><head><title>Pampaintspill User Manual</title></head>
3 <body>
4 <h1>pampaintspill</h1>
5 Updated: 02 November 2021
6 <br>
7 <a href="#index">Table Of Contents</a>
8
9 <h2>NAME</h2>
10 pampaintspill - smoothly spill colors into the background
11
12 <h2 id="synopsis">SYNOPSIS</h2>
13
14 <p>
15 <b>pampaintspill</b>
16 [<b>--bgcolor</b>=<i>color</i>]
17 [<b>--wrap</b>]
18 [<b>--all</b>]
19 [<b>--downsample</b>=<i>number</i>]
20 [<b>--near</b>=<i>number</i>]
21 [<b>--power</b>=<i>number</i>] [<i>filename</i>]
22 [<b>-randomseed=</b><i>integer</i>]
23
24
25 <p>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 <h2 id="description">DESCRIPTION</h2>
31
32 <p>This program is part of <a href="index.html">Netpbm</a>.
33
34 <p><b>pampaintspill</b> produces a smooth color gradient from all of the
35 non-background-colored pixels in an input image, effectively "spilling
36 paint" onto the background. <b>pampaintspill</b> is similar to
37 <b>pamgradient</b> but differs in the following characteristics:
38
39 <ul>
40 <li><b>pampaintspill</b> accepts any number of paint
41 sources (non-background-colored pixels), which can lie anywhere
42 on the canvas. <b>pamgradient</b> accepts exactly
43 four paint sources, one in each corner of the image.
44
45 <li><b>pampaintspill</b> requires an input image while
46 <b>pamgradient</b> generates a new image from
47 scratch.
48
49 <li><b>pampaintspill</b> can produce tileable output and
50 can control how tightly the gradient colors bind to their source
51 pixels.
52 </ul>
53
54 <p>Results are generally best when the input image contains just a few, crisp
55 spots of color. Use your drawing program's pencil tool &mdash; as opposed to a
56 paintbrush or airbrush tool &mdash; with a small nib.
57
58 <h2 id="options">OPTIONS</h2>
59
60 <p>In addition to the options common to all programs based on libnetpbm
61 (most notably <b>-quiet</b>, see <a href="index.html#commonoptions">
62 Common Options</a>), <b>pampaintspill</b> recognizes the following
63 command line options:
64
65 <dl>
66 <dt><b>--bgcolor</b>=<i>color</i></dt>
67 <dd>Explicitly specify the background color. <i>color</i> can be
68 specified using any of the formats accepted by the <a
69 href="libnetpbm_image.html#colorname"><code>pnm_parsecolor()</code> library
70 routine</a> such as <code>red</code> or <code>#ff0000</code>. If
71 <b>--bgcolor</b> is not specified, <b>pampaintspill</b> makes an
72 educated guess about the background color based on the colors in the
73 image's corners.</dd>
74
75 <dt><b>--wrap</b></dt>
76 <dd>Allow gradients to wrap around image borders. That is, colors
77 that spill off the right side of the image reappear on the left side of
78 the image and likewise for left/right, top/bottom, and
79 bottom/top. <b>--wrap</b> makes images tileable, which is nice for
80 producing desktop backgrounds.</dd>
81
82 <dt><b>--all</b></dt>
83 <dd>Recolor all pixels, not just background pixels. Normally,
84 non-background-colored pixels in the input image appear unmodified in
85 the output image. With <b>--all</b>, <em>all</em> pixels are colored
86 based on their distance from all of the (other) non-background-colored
87 pixels.</dd>
88
89 <dt><b>--downsample</b>=<i>number</i></dt>
90 <dd>Ignore all but <i>number</i> non-background-colored pixels.
91 When a large number of pixels in the input image differ in color from
92 the background, <b>pampaintspill</b> runs very slowly. The
93 <b>--downsample</b> option randomly selects a given number of colored
94 pixels to use as paint sources for the gradients and ignores the rest,
95 thereby trading off image quality for speed of execution.</dd>
96
97 <dt><b>--near</b>=<i>number</i></dt>
98 <dd>Consider only the nearest <i>number</i> paint sources when computing
99 a pixel's new color. The default is to consider all paint sources.
100 In most cases, <i>number</i> should be fairly small, or its impact
101 will be minimal and execution time will increase unnecessarily. A
102 value of 1 produces a coloring that looks a lot like a Voronoi
103 diagram.
104
105 <p>This option was new in Netpbm 10.97 (December 2021).</dd>
106
107 <dt><b>--power</b>=<i>number</i></dt>
108 <dd>Control how color intensity changes as a function of the
109 distance from a paint source. The default value for <i>number</i> is
110 -2.0, which means that intensity drops (because of the minus sign) with
111 the square (because of the 2.0) of the distance from each paint
112 source. -2.0 generally works well in practice, but other values can be
113 specified for various special effects. With very small numbers of paint
114 sources, -1.0 may produce subtler gradients, but these get muddier as
115 the number of paint sources increases. Positive numbers (e.g., 1.0 and
116 2.0) make the paint sources stand out in the output image by pushing the
117 gradients away from them.</dd>
118
119 <dt><b>-randomseed=</b><i>integer</i>
120 <dd>This is the seed for the random number generator that generates the
121 pixels.
122
123 <p>Use this to ensure you get the same image on separate invocations.
124
125 <p>This option was new in Netpbm 10.94 (March 2021).</dd>
126 </dl>
127
128
129 <h2 id="seealso">SEE ALSO</h2>
130
131 <ul>
132 <li><a href="pamgradient.html"><b>pamgradient</b></a>
133 <li><a href="ppmmake.html"><b>ppmmake</b></a>,
134 <li><a href="ppmrainbow.html"><b>ppmrainbow</b></a>,
135 <li><a href="pgmramp.html"><b>pgmramp</b></a>,
136 <li><a href="ppmpat.html"><b>ppmpat</b></a>,
137 <li><a href="pam.html"><b>pam</b></a>
138 </ul>
139
140 <h2 id="history">HISTORY</h2>
141
142 <p><b>pampaintspill</b> was new in Netpbm 10.50 (March 2010).
143
144
145 <h2 id="copyright">COPYRIGHT</h2>
146
147 <p>Copyright&nbsp;&copy; 2010&ndash;2021 Scott Pakin,
148 <a href="mailto:[email protected]"><i>[email protected]</i></a>.
149
150 <h2 id="index">Table Of Contents</h2>
151
152 <ul>
153 <li><a href="#synopsis">SYNOPSIS</a>
154 <li><a href="#description">DESCRIPTION</a>
155 <li><a href="#options">OPTIONS</a>
156 <li><a href="#seealso">SEE ALSO</a>
157 <li><a href="#history">HISTORY</a>
158 <li><a href="#copyright">COPYRIGHT</a>
159 </ul>
160
161 </body>
162 </html>