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
|
\
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
.\" Do not hand-hack it! If you have bug fixes or improvements, please find
.\" the corresponding HTML page on the Netpbm website, generate a patch
.\" against that, and send it to the Netpbm maintainer.
.TH "Ppmrough User Manual" 1 "20 August 2023" "netpbm documentation"
.SH NAME
ppmrough - create PPM image of a single color rectangle with ragged edges on a
different color background
.UN synopsis
.SH SYNOPSIS
\fBppmrough\fP
[\fB-left \fP\fIpixels\fP]
[\fB-right \fP\fIpixels\fP]
[\fB-top \fP\fIpixels\fP]
[\fB-bottom \fP\fIpixels\fP]
[\fB-width \fP\fIpixels\fP]
[\fB-height \fP\fIpixels\fP]
[\fB-bg \fP\fIcolorspec\fP]
[\fB-fg \fP\fIcolorspec\fP]
[\fB-var \fP\fIpixels\fP]
[\fB-randomseed \fP\fIseed\fP]
[\fB-verbose\fP]
.PP
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.
.UN description
.SH DESCRIPTION
.PP
This program is part of
.BR "Netpbm" (1)\c
\&.
.PP
\fBppmrough\fP generates a PPM image of the specified width and height.
The image consists of a rectangle of the specified foreground color
surrounded by borders of the specified size and background color, except
that the boundary between the foreground rectangle and the borders is
ragged. The ragged effect is random.
.PP
\fBppmrough\fP writes the PPM image to Standard Output.
.PP
The maxval of the output image is 255 (You can change this with
\fBpamdepth\fP).
.PP
Use the options \fB-left\fP or \fB-right\fP, respectively, to make
vertical borders, and \fB-top\fP or \fB-bottom\fP, respectively, to generate
horizontal borders inside the image. The value of each of these options is
the minimum width of the border on that edge. Beyond that minimum, the width
at any given location on that edge is random, varying along the edge in a
fractal kind of way.
.PP
Use the \fB-var\fP option to control the "raggedness" of
the border. The lower its value, the smoother the border is. You
can initialize the pseudo-random generator with the \fB-init\fP
option.
.PP
You could use \fBppmrough\fP with \fBppmtopgm\fP to create a PGM
transparency mask and use it to roughen up the edges of another image.
.UN options
.SH OPTIONS
.PP
In addition to the options common to all programs based on libnetpbm
(most notably \fB-quiet\fP, see
.UR index.html#commonoptions
Common Options
.UE
\&), \fBppmrough\fP recognizes the following
command line options:
.TP
\fB-width=\fP\fIpixels\fP
This specifies the width of the image in pixels (default: 100).
.TP
\fB-height=\fP\fIpixels\fP
This specifies the height of the image in pixels (default: 100).
.TP
\fB-left=\fP\fIpixels\fP
.TP
\fB-right=\fP\fIpixels\fP
.TP
\fB-top=\fP\fIpixels\fP
.TP
\fB-bottom=\fP\fIpixels\fP
This option causes the program to create a left, right, top, or bottom
border, respectively, at least \fIpixels\fP pixels wide, varying randomly
beyond that. You may specify any combination of these.
.TP
\fB-bg=\fP\fIcolorspec\fP
This is the background color, i.e. the color of the
borders. \fIcolorspec\fP is as described for the
.UR libnetpbm_image.html#colorname
argument of the \fBpnm_parsecolor()\fP library routine
.UE
\&. Default is black.
.TP
\fB-fg=\fP\fIcolor\fP
This specifies the foreground color, i.e. the color of the center of the
mage -- everything but the borders. \fIcolorspec\fP is as described for the
.UR libnetpbm_image.html#colorname
argument of the \fBpnm_parsecolor()\fP library routine
.UE
\&. Default is white.
.TP
\fB-var=\fP\fIpixels\fP
This specifies how ragged the borders are -- how much and how quickly its
width varies along the image edge. Its specific meaning is complex, but the
larger it is, the more the border varies. Zero means it does not vary at all
-- the edge of the foreground is straight.
.sp
This must be a nonnegative integer. The default is 10.
.TP
\fB-randomseed=\fP\fIseed\fP
Use this option to initialize the pseudo-random number generator
with \fIseed\fP.
.sp
You can use this to cause the program to produce repeatable output.
.sp
Before Netpbm 10.61 (December 2012), this is called \fB-init\fP,
and that still works.
.TP
\fB-verbose\fP
Run \fBppmrough\fP in verbose mode. It reports all parameters on
Standard Error.
.UN seealso
.SH SEE ALSO
.BR "ppmmake" (1)\c
\&,
.BR "pamcat" (1)\c
\&,
.BR "ppmtopgm" (1)\c
\&,
.BR "ppm" (1)\c
\&,
.UN history
.SH HISTORY
.PP
This program was added to Netpbm in Release 10.9 (September 2002).
.UN author
.SH AUTHOR
Copyright (C) 2002 by Eckard Specht.
.SH DOCUMENT SOURCE
This manual page was generated by the Netpbm tool 'makeman' from HTML
source. The master documentation is at
.IP
.B http://netpbm.sourceforge.net/doc/ppmrough.html
.PP
|