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
|
\
.\" 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" 0 "28 January 2022" "netpbm documentation"
.SH NAME
ppmrough - create PPM image of two colors with a ragged border between them
.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, height, and
colors. \fBppmrough\fP tiles the image into semi-rectangular regions with a
ragged borders between them. It calculates the fluctuations with
pseudo-random numbers.
.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. Each of
these options needs an integer value \fIpixels\fP that determines the
average distance of the interior border to the related edge of the
image. You may combine the \fB-left\fP, \fB-right\fP, \fB-top\fP,
and \fB-bottom\fP 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. \fB-left\fP) value without dislocations.
.PP
You specify the dimensions of the generated image with the
\fB-width\fP and \fB-height\fP options.
.PP
Use the \fB-bg\fP and \fB-fg\fP options to set the background
(margin) color and the foreground (interior) color, respectively. If
you don't specify any of the \fB-left\fP, \fB-right\fP, \fB-top\fP,
and \fB-bottom\fP options, all pixels are set to foreground color.
The defaults are white foreground and black background.
.PP
Use the \fB-var\fP 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 \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-left=\fP\fIpixels\fP
Specifies the mean distance of the border from the left margin
(default: no border).
.TP
\fB-right=\fP\fIpixels\fP
Specifies the mean distance of the border from the right margin
(default: no border).
.TP
\fB-top=\fP\fIpixels\fP
Specifies the mean distance of the border from the top margin
(default: no border).
.TP
\fB-bottom=\fP\fIpixels\fP
Specifies the mean distance of the border from the bottom margin
(default: no border).
.TP
\fB-width=\fP\fIpixels\fP
Specifies the width of the image (default: 100).
.TP
\fB-height=\fP\fIpixels\fP
Specifies the height of the image (default: 100).
.TP
\fB-bg=\fP\fIcolorspec\fP
Background color. \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
Foreground color. \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
Specifies the variance of the ragged border (default: 10). Must
be a positive integer. Set \fIpixels\fP to 1 to get a straight
border.
.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
|