summary refs log tree commit diff
path: root/ppmpat.html
blob: 3c395e0a1864384ab49609918162e7ac399e5bd5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
<html><head><title>Ppmpat User Manual</title></head>
<body>
<h1>ppmpat</h1>
Updated: 02 March 2016
<br>
<a href="#index">Table Of Contents</a>

<h2>NAME</h2>

ppmpat - make a pretty PPM image

<h2 id="synopsis">SYNOPSIS</h2>

<b>ppmpat</b>
[{<b>-gingham2</b>|<b>-g2</b>} |
{<b>-gingham3</b>|<b>-g3</b>} |
<b>-madras</b> |
<b>-tartan</b> |
<b>-poles</b> |
<b>-squig</b> |
<b>-camo</b> |
<b>-anticamo</b> |
<b>-argyle1</b> |
<b>-argyle2</b>]
[<b>-color</b> <i>colorlist</i>]
[<b>-mesh</b>]
[<b>-randomseed</b> <i>integer</i>]

<i>width</i> <i>height</i>


<p>You can abbreviate any option to its shortest unique prefix.

<h2 id="description">DESCRIPTION</h2>

<p>This program is part of <a href="index.html">Netpbm</a>.

<p><b>ppmpat</b> produces a PPM of the specified width and height,
with a pattern in it.

<p>You could, for example, use it to create wallpaper for a computer screen.

<p>One use of this program is as an example of the Netpbm library
<a href="libnetpbm_draw.html">drawing</a> functions, which it uses.

<p>Some of the patterns have large numbers of colors, so if you want
a simpler pattern, use <b>pnmquant</b> on the output.

<h2 id="options">OPTIONS</h2>

<p>In addition to the options common to all programs based on libnetpbm
(most notably <b>-quiet</b>, see <a href="index.html#commonoptions">
Common Options</a>), <b>ppmpat</b> recognizes the following
command line options:

<h3 id="patspec">Pattern Specification</h3>

<p>Specify the pattern type with these options.  One pattern type must
be specified.

<dl compact>
<dt><b>-gingham2</b> <b>-g2</b>

<dd>A gingham check pattern.  Can be tiled.

<p>If you specify -color, give two colors: background and foreground, in that
order.

<dt><b>-gingham3</b> <b>-g3</b>

<dd>A slightly more complicated gingham.  Can be tiled.

<p>If you specify -color, give three colors: background and two foregrounds,
in that order.

<dt><b>-madras</b>

<dd>A madras plaid.  Can be tiled.

<p>If you specify -color, give three colors: background and two foregrounds,
in that order.

<dt><b>-tartan</b>

<dd>A tartan plaid.  Can be tiled.

<p>If you specify -color, give three colors: background and two foregrounds,
in that order.

<dt><b>-poles</b>

<dd>Color gradients centered on randomly-placed poles.

<p>If you specify -color, give two or more colors.

<dt><b>-squig</b>

<dd>Squiggley tubular pattern.  Can be tiled.

<p>If you specify -color, give three or more colors.  The first is the
background color.

<dt><b>-camo</b>

<dd>Camouflage pattern.

<p>If you specify <b>-color</b>, give three or more colors.  The first is the
background color; the others are colors for the leafy foreground shapes.
The foreground shapes will probably occupy nearly the entire image, so that the
background color is barely visible.

<dt><b>-anticamo</b>

<dd>Anti-camouflage pattern - like -camo, but ultra-bright colors.

<p>If you specify <b>-color</b>, this is the same as <b>-camo</b>.

<dt><b>-argyle1</b>

<dd>A diamond argyle pattern, without a cross through the diamond, with one
diamond.  Can be tiled.

<p>If you specify -color, give two colors: background and foreground, in that
order.

<p>This option was new in Netpbm 10.78 (March 2017).

<dt><b>-argyle2</b>

<dd>A diamond argyle pattern, with a cross through the diamond, with one
diamond.  Can be tiled.

<p>If you specify -color, give three colors: background, foreground, and
stripe, in that order.

<p>This option was new in Netpbm 10.78 (March 2017).

</dl>

<h3 id="otheropts">Other Options</h3>

<dl compact>

<dt><b>-color</b> <i>colorlist</i>

<dd>This specifies the colors to appear in the pattern.

<p>If you do not specify this option, <b>ppmpat</b> chooses colors at random.

<p>Different patterns take different numbers of colors.  Some can involve
variable numbers of colors.  If you specify a number of colors incompatible
with the pattern you specify, <b>ppmpat</b> fails, telling you how many colors
to specify.

<p><i>colorlist</i> is a comma-separated list of colors.
<p>Specify each color as described for the <a
href="libnetpbm_image.html#colorname">argument of the <b>pnm_parsecolor()</b>
library routine</a>.

<p>Example: <b>-color red, green, rgbi:1.0/0.5/.25</b> .

<p>This option was new in Netpbm 10.78 (March 2017).

<dt><b>-mesh</b>

<dd>This option affects the patterns generated by the
<b>-gingham2</b>, <b>-gingham3</b>, <b>-madras</b>, and <b>-tartan</b>.  When
this option is <em>not</em> specified, when two colors intersect, the program
mixes them and puts the average in the rectangular intersection region.
with <b>-mesh</b>, the program fills that region with a checkerboard pattern
consisting of the two colors.  The resulting image looks like a true woven
fabric, with separate threads for the separate colors.

<p>This option was new in Netpbm 10.97 (December 2021).

  
<dt><b>-randomseed</b> <i>integer</i>

<dd>This is the seed for the random number generator that generates the
pixels.

<p>Use this to ensure you get the same image on separate invocations.

<p>By default, <b>ppmpat</b> uses a seed derived from the time of day
and process ID, which gives you fairly uncorrelated results in multiple
invocations.

<p>This option was new in Netpbm 10.61 (December 2012).

</dl>

<h2 id="references">REFERENCES</h2>

Some of the patterns are from "Designer's Guide to Color 3"
by Jeanne Allen.

<h2 id="seealso">SEE ALSO</h2>

<a href="pnmtile.html">pnmtile</a>, 
<a href="pnmquant.html">pnmquant</a>, 
<a href="ppmmake.html">ppmmake</a>, 
<a href="ppmrainbow.html">ppmrainbow</a>, 
<a href="pamgradient.html">pamgradient</a>, 
<a href="ppm.html">ppm</a>

<h2 id="author">AUTHOR</h2>

Copyright (C) 1989 by Jef Poskanzer.

<hr>
<h2 id="index">Table Of Contents</h2>
<ul>
<li><a href="#synopsis">SYNOPSIS</a>
<li><a href="#description">DESCRIPTION</a>
<li><a href="#options">OPTIONS</a>
  <ul>
  <li><a href="#patspec">Pattern Specification</a>
  <li><a href="#otheropts">Other Options</a>
  </ul>
<li><a href="#references">REFERENCES</a>
<li><a href="#seealso">SEE ALSO</a>
<li><a href="#author">AUTHOR</a>
</ul>
</body>
</html>