diff options
Diffstat (limited to 'upstream/mageia-cauldron/man1/pamshuffle.1')
-rw-r--r-- | upstream/mageia-cauldron/man1/pamshuffle.1 | 179 |
1 files changed, 179 insertions, 0 deletions
diff --git a/upstream/mageia-cauldron/man1/pamshuffle.1 b/upstream/mageia-cauldron/man1/pamshuffle.1 new file mode 100644 index 00000000..7a502eaa --- /dev/null +++ b/upstream/mageia-cauldron/man1/pamshuffle.1 @@ -0,0 +1,179 @@ +\ +.\" 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 "Pamshuffle User Manual" 0 "" "netpbm documentation" + +Updated: +.SH NAME +pamshuffle - Shuffle pixels of a Netpbm image + +.UN synopsis +.SH SYNOPSIS + +\fBpamshuffle\fP +[\fB-column\fP +[\fB-randomseed\fP \fIinteger\fP]] +[\fIpamfile\fP] +.PP +Minimum unique abbreviations of option are acceptable. You may use +double hyphens instead of single hyphen to denote options. You may use +white space in place of the equals sign to separate an option name +from its value. + +.UN description +.SH DESCRIPTION +.PP +This program is part of +.BR "Netpbm" (1)\c +\&. +.PP +\fBpamshuffle\fP reads a Netpbm image as input and produces an output file +with the pixels shuffled. The operation only changes the location of existing +pixels; nothing is discarded or added. +.PP +By default, pixels change location within rows independently, but it is +also possible to perform the same shuffle on every row, meaning the program is +shuffling vertical columns of pixels. Either way, there is no vertical +rearrangement; this means images consisting entirely of horizontal stripes, +such as the national banners of Germany, Thailand and Ukraine, will be +unchanged. +.PP +To shuffle vertically, or to perform a complete scramble, use +\fBpamshuffle\fP together with \fBpamflip\fP. See examples below. +.PP +Input is from Standard Input if you don't specify the input file +\fIpamfile\fP. +.PP +Output is to Standard Output. +.PP +\fBpamshuffle\fP works on a multi-image stream. It operates on +each image in the stream independently and produces a multi-image +stream output. +.PP +The shuffling algorithm is the widely known +.UR https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle + Fisher-Yates method +.UE +\&. + + +.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 +\&), \fBpamshuffle\fP recognizes the following +command line options: + + +.TP +\fB-column\fP +Shuffle vertical columns, i.e. perform the same movement on all rows. +Without this option, the program shuffles each row independently. + +.TP +\fB-randomseed\fP= \fIinteger\fP +This is the seed for the random number generator that generates the +pixels. +.sp +Use this to ensure you get the same image on separate invocations. +.sp +By default, \fBpamshuffle\fP uses a seed derived from the time of day +and process ID, which gives you quite uncorrelated results in multiple +invocations. + + + +.UN examples +.SH EXAMPLES +.PP +In the following example, output is to Standard Output. You will probably +want to add redirection to somewhere useful. + + +.IP \(bu + +.sp +\fBpamshuffle\fP is useful when you want to randomize the orderly +output of image generators such as \fBpamseq\fP and \fBpgmramp\fP. +.sp +Produce five permutations of integers 0 to 15: + +.nf +\f(CW +pgmramp -lr -maxval=15 16 5 | pamshuffle -plain +\fP + +.fi + +.IP \(bu +Shuffle columns: + +.nf +\f(CW +pamshuffle -column image.ppm +\fP + +.fi + + +.IP \(bu +Shuffle rows: + +.nf +\f(CW +pamflip -cw image.ppm | pamshuffle | pamflip -ccw +\fP + +.fi + +.IP \(bu +Perform complete shuffle: + +.nf +\f(CW +pamflip -cw image.ppm | pamshuffle | pamflip -ccw | pamshuffle +\fP + +.fi + + + + +.UN seealso +.SH SEE ALSO +.BR "pamseq" (1)\c +\&, +.BR "pgmramp" (1)\c +\&, +.BR "pamflip" (1)\c +\&, +.BR "ppmshift" (1)\c +\&, +.BR "ppmspread" (1)\c +\&, +.BR "pam" (1)\c +\& + + +.UN history +.SH HISTORY +.PP +\fBpamshuffle\fP was new in Netpbm 10.99 (June 2022). + + +.UN author +.SH AUTHOR + +By Akira F. Urushibata. Contributed to the public domain by the author. +.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/pamshuffle.html +.PP
\ No newline at end of file |