1Pamshuffle User Manual(0)                            Pamshuffle User Manual(0)
2
3
4
5Updated:
6

NAME

8       pamshuffle - Shuffle pixels of a Netpbm image
9
10

SYNOPSIS

12       pamshuffle [-column [-randomseed integer]] [pamfile]
13
14       Minimum  unique  abbreviations  of  option are acceptable.  You may use
15       double hyphens instead of single hyphen to denote options.  You may use
16       white space in place of the equals sign to separate an option name from
17       its value.
18
19

DESCRIPTION

21       This program is part of Netpbm(1).
22
23       pamshuffle reads a Netpbm image as input and produces  an  output  file
24       with  the  pixels shuffled.  The operation only changes the location of
25       existing pixels; nothing is discarded or added.
26
27       By default, pixels change location within rows independently, but it is
28       also  possible  to  perform  the same shuffle on every row, meaning the
29       program is shuffling vertical columns of pixels.  Either way, there  is
30       no  vertical  rearrangement;  this  means images consisting entirely of
31       horizontal stripes, such as the national banners of  Germany,  Thailand
32       and Ukraine, will be unchanged.
33
34       To  shuffle vertically, or to perform a complete scramble, use pamshuf‐
35       fle together with pamflip.  See examples below.
36
37       Input is from Standard Input if you don't specify the input  file  pam‐
38       file.
39
40       Output is to Standard Output.
41
42       pamshuffle works on a multi-image stream.  It operates on each image in
43       the stream independently and produces a multi-image stream output.
44
45       The shuffling algorithm is the widely known
46        Fisher-Yates                                                    method
47https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle⟩ .
48
49
50

OPTIONS

52       In  addition  to  the options common to all programs based on libnetpbm
53       (most notably -quiet, see
54        Common Options ⟨index.html#commonoptions⟩ ), pamshuffle recognizes the
55       following command line options:
56
57
58
59       -column
60              Shuffle  vertical columns, i.e. perform the same movement on all
61              rows.  Without this option, the program shuffles each row  inde‐
62              pendently.
63
64
65       -randomseed= integer
66              This  is the seed for the random number generator that generates
67              the pixels.
68
69              Use this to ensure you get the same image  on  separate  invoca‐
70              tions.
71
72              By  default, pamshuffle uses a seed derived from the time of day
73              and process ID, which gives you fairly uncorrelated  results  in
74              multiple invocations.
75
76
77
78

EXAMPLES

80       In the following example, output is to Standard Output.  You will prob‐
81       ably want to add redirection to somewhere useful.
82
83
84
85
86
87
88              pamshuffle is useful when you want to randomize the orderly out‐
89              put of image generators such as pamseq and pgmramp.
90
91              Produce five permutations of integers 0 to 15:
92
93              pgmramp -lr -maxval=15 16 5 | pamshuffle -plain
94
95
96
97       •      Shuffle columns:
98
99              pamshuffle -column image.ppm
100
101
102
103
104       •      Shuffle rows:
105
106              pamflip -cw image.ppm | pamshuffle | pamflip -ccw
107
108
109
110       •      Perform complete shuffle:
111
112              pamflip -cw image.ppm | pamshuffle | pamflip -ccw | pamshuffle
113
114
115
116
117
118

SEE ALSO

120       pamseq(1), pgmramp(1), pamflip(1), ppmshift(1), ppmspread(1), pam(1)
121
122
123

HISTORY

125       pamshuffle was new in Netpbm 10.99 (June 2022).
126
127
128

AUTHOR

130       By  Akira  F.  Urushibata.  Contributed to the public domain by the au‐
131       thor.
132

DOCUMENT SOURCE

134       This manual page was generated by the Netpbm tool 'makeman'  from  HTML
135       source.  The master documentation is at
136
137              http://netpbm.sourceforge.net/doc/pamshuffle.html
138
139netpbm documentation                                 Pamshuffle User Manual(0)
Impressum