summary refs log tree commit diff
path: root/ppmrough.html
blob: 7ecc343d6c0638db8dedb49a0f2b8fc6e7da3e14 (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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
<html><head><title>Ppmrough User Manual</title></head>
<body>
<h1>ppmrough</h1>
Updated: 28 January 2022
<br>
<a href="#index">Table Of Contents</a>

<h2>NAME</h2>
ppmrough - create PPM image of two colors with a ragged border between them

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

<b>ppmrough</b>

[<b>-left </b><i>pixels</i>]

[<b>-right </b><i>pixels</i>]

[<b>-top </b><i>pixels</i>]

[<b>-bottom </b><i>pixels</i>]

[<b>-width </b><i>pixels</i>]

[<b>-height </b><i>pixels</i>]

[<b>-bg </b><i>colorspec</i>]

[<b>-fg </b><i>colorspec</i>]

[<b>-var </b><i>pixels</i>]

[<b>-randomseed </b><i>seed</i>]

[<b>-verbose</b>]

<p>All options can be abbreviated to their shortest unique prefix.
You may use two hyphens instead of one.  You may separate an option
name and its value with white space instead of an equals sign.

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

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

<p><b>ppmrough</b> generates a PPM image of the specified width, height, and
colors.  <b>ppmrough</b> tiles the image into semi-rectangular regions with a
ragged borders between them.  It calculates the fluctuations with
pseudo-random numbers.

<p><b>ppmrough</b> writes the PPM image to Standard Output.

<p>The maxval of the output image is 255 (You can change this with
<b>pamdepth</b>).

<p>Use the options <b>-left</b> or <b>-right</b>, respectively, to
make vertical borders, and <b>-top</b> or <b>-bottom</b>,
respectively, to generate horizontal borders inside the image.  Each of
these options needs an integer value <i>pixels</i> that determines the
average distance of the interior border to the related edge of the
image.  You may combine the <b>-left</b>, <b>-right</b>, <b>-top</b>,
and <b>-bottom</b> options to generate an image with more than one
border.  The algorithm ensures that you can concatenate two images
produced with the same (i.e. <b>-left</b>) value without dislocations.

<p>You specify the dimensions of the generated image with the
<b>-width</b> and <b>-height</b> options.

<p>Use the <b>-bg</b> and <b>-fg</b> options to set the background
(margin) color and the foreground (interior) color, respectively.  If
you don't specify any of the <b>-left</b>, <b>-right</b>, <b>-top</b>,
and <b>-bottom</b> options, all pixels are set to foreground color.
The defaults are white foreground and black background.

<p>Use the <b>-var</b> option to control the "raggedness" of
the border.  The less its value is the smoother the border is.  You
can initialize the pseudo-random generator with the <b>-init</b>
option.

<p>You could use <b>ppmrough</b> with <b>ppmtopgm</b> to create a PGM
transparency mask and use it to roughen up the edges of another image.

<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>ppmrough</b> recognizes the following
command line options:

<dl compact>
<dt><b>-left=</b><i>pixels</i>

<dd> Specifies the mean distance of the border from the left margin
(default: no border).

<dt><b>-right=</b><i>pixels</i>

<dd>Specifies the mean distance of the border from the right margin
(default: no border).

<dt><b>-top=</b><i>pixels</i>

<dd>Specifies the mean distance of the border from the top margin
(default: no border).

<dt><b>-bottom=</b><i>pixels</i>

<dd>Specifies the mean distance of the border from the bottom margin
(default: no border).

<dt><b>-width=</b><i>pixels</i>

<dd>Specifies the width of the image (default: 100).

<dt><b>-height=</b><i>pixels</i>

<dd>Specifies the height of the image (default: 100).

<dt><b>-bg=</b><i>colorspec</i>

<dd>Background color.  <i>colorspec</i> is as described for the
<a href="libnetpbm_image.html#colorname">argument of the
<b>pnm_parsecolor()</b> library routine</a>.  Default is black.

<dt><b>-fg=</b><i>color</i>

<dd>Foreground color.  <i>colorspec</i> is as described for the
<a href="libnetpbm_image.html#colorname">argument of the
<b>pnm_parsecolor()</b> library routine</a>.  Default is white.

<dt><b>-var=</b><i>pixels</i>

<dd> Specifies the variance of the ragged border (default: 10). Must
be a positive integer.  Set <i>pixels</i> to 1 to get a straight
border.

<dt><b>-randomseed=</b><i>seed</i>

<dd>Use this option to initialize the pseudo-random number generator
with <i>seed</i>.

<p>You can use this to cause the program to produce repeatable output.

<p>Before Netpbm 10.61 (December 2012), this is called <b>-init</b>,
and that still works.

<dt><b>-verbose</b>

<dd>Run <b>ppmrough</b> in verbose mode.  It reports all parameters on
Standard Error.

</dl>

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

<b><a href="ppmmake.html">ppmmake</a></b>,
<b><a href="pamcat.html">pamcat</a></b>,
<b><a href="ppmtopgm.html">ppmtopgm</a></b>,
<b><a href="ppm.html">ppm</a></b>,

<h2 id="history">HISTORY</h2>

<p>
This program was added to Netpbm in Release 10.9 (September 2002).

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

Copyright (C) 2002 by Eckard Specht.


<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>
<li><a href="#seealso">SEE ALSO</a>
<li><a href="#history">HISTORY</a>
<li><a href="#author">AUTHOR</a>
</ul>
<hr>
</body>
</html>