1Pbmnoise User Manual(0)                                Pbmnoise User Manual(0)
2
3
4

NAME

6       pbmnoise - create a PBM image made up of white noise
7
8

SYNOPSIS

10       pbmnoise width height
11
12       [-ratio=M/N]  [-pack]  [-randomseed=integer]  [-endian=]{big|little|na‐
13       tive|swap}]
14
15       Minimum unique abbreviations of option are  acceptable.   You  may  use
16       double hyphens instead of single hyphen to denote options.  You may use
17       white space in place of the equals sign to separate an option name from
18       its value.
19
20

DESCRIPTION

22       This program is part of Netpbm(1).
23
24       pbmnoise creates a PBM image with random pixels.  You specify the prob‐
25       ability each pixel will be black or white (essentially, the  proportion
26       of black to white pixels in the image).
27
28       You specify the dimensions of the image with the width and height argu‐
29       ments.
30
31
32

OPTIONS

34       In addition to the options common to all programs  based  on  libnetpbm
35       (most notably -quiet, see
36        Common  Options  ⟨index.html#commonoptions⟩ ), pbmnoise recognizes the
37       following command line options:
38
39
40
41       -ratio=M/N
42              The proportion of black pixels in the generated image.
43
44              To be precise, this is the probability that any given pixel will
45              be  black.   By the law of large numbers, we can expect the pro‐
46              portion of black pixels in a reasonably large image to be  close
47              to this fraction.
48
49              The option value is a fraction.  The denominator must be 1 or an
50              integer power of 2 up to 65536.  the numerator must be  0  or  a
51              positive integer not exceeding denominator.
52
53              The default is 1/2, meaning the output image has essentially the
54              same number of black and white pixels.
55
56              If the ratio is 0 the output image is entirely white.  If 1, the
57              output is entirely black.
58
59
60       -pack  The  program  generates  pixels  in  32-bit units discarding any
61              fractional pixels at row ends by default.  When this  option  is
62              specified,  the  unused pixels are carried over to the next row,
63              eliminating waste in exchange for some overhead cost.
64
65              Using this option improves performance when the image  width  is
66              small.
67
68
69       -randomseed=integer
70              This  is the seed for the random number generator that generates
71              the pixels.
72
73              Use this to ensure you get the same image  on  separate  invoca‐
74              tions.
75
76              By  default,  pbmnoise  uses a seed derived from the time of day
77              and process ID, which gives you fairly uncorrelated  results  in
78              multiple invocations.
79
80
81       -endian=mode
82              pbmnoise  internally  generates  random 32-bit integers and uses
83              the machine's binary encoding of those integers  as  strings  of
84              pixels.   Because  the  integers are random, it doesn't normally
85              matter what binaary encoding is used for them, but if  you  need
86              consistent results between machines using the same random number
87              generator, it matters.  For that reason (mainly for testing  the
88              program),  this  option  lets you control that encoding, between
89              big-endian and little-endian.
90
91              mode is one of the following:
92
93
94
95       big    Force big-endian output by rearranging  bytes  on  little-endian
96              machines.  No effect on big-endian machines.
97
98
99       little Likewise, force little-endian output.
100
101
102       native Do not rearrange anything.  This is the default.
103
104
105       swap   Always swap regardless of system endianness.
106
107
108
109
110

EXAMPLES

112       This generates a random PBM image with roughly one-third of pixels col‐
113       ored black:
114         pbmnoise -ratio=11/32 1200 1200 > random.pbm
115
116       The following is an alternate method for generating a random PBM  image
117       which uses pgmnoise and pgmtopbm instead of pbmnoise.  It is less effi‐
118       cient.
119         pgmnoise -maxval=100 1200 1200 | \
120           pgmtopbm -threshold -value=0.333 > random.pbm
121
122       This generates a random PPM image, maxval 1:
123         pbmnoise 600 400 > red.pbm
124         pbmnoise 600 400 > green.pbm
125         pbmnoise 600 400 > blue.pbm
126         rgb3topbm red.pbm green.pbm blue.pbm > random.ppm
127
128
129

SEE ALSO

131       pbm(1) pgmnoise(1) pgmtopbm(1)
132
133

HISTORY

135       pbmnoise was new in Netpbm 10.97 (December 2021).
136
137       In Netpbm before that, you can use pgmnoise.
138
139
140

AUTHOR

142       Akira F Urushibata wrote this program and contributed it to the  public
143       domain in December 2021.
144

DOCUMENT SOURCE

146       This  manual  page was generated by the Netpbm tool 'makeman' from HTML
147       source.  The master documentation is at
148
149              http://netpbm.sourceforge.net/doc/pbmnoise.html
150
151netpbm documentation           18 December 2021        Pbmnoise User Manual(0)
Impressum