{
    "mode": "man",
    "parameter": "pamshuffle",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/pamshuffle/1/json",
    "generated": "2026-10-24T06:27:02Z",
    "synopsis": "pamshuffle [-column [-randomseed integer]] [pamfile]\nMinimum unique abbreviations of option are acceptable.  You may use double hyphens instead of\nsingle hyphen to denote options.  You may use white space in place of the equals sign to sep‐\narate an option name from its value.",
    "sections": {
        "NAME": {
            "content": "pamshuffle - Shuffle pixels of a Netpbm image\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "pamshuffle [-column [-randomseed integer]] [pamfile]\n\nMinimum unique abbreviations of option are acceptable.  You may use double hyphens instead of\nsingle hyphen to denote options.  You may use white space in place of the equals sign to sep‐\narate an option name from its value.\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This program is part of Netpbm(1).\n\npamshuffle  reads  a  Netpbm image as input and produces an output file with the pixels shuf‐\nfled.  The operation only changes the location of existing pixels; nothing  is  discarded  or\nadded.\n\nBy default, pixels change location within rows independently, but it is also possible to per‐\nform the same shuffle on every row, meaning the program is shuffling vertical columns of pix‐\nels.   Either  way, there is no vertical rearrangement; this means images consisting entirely\nof horizontal stripes, such as the national banners of Germany, Thailand and Ukraine, will be\nunchanged.\n\nTo shuffle vertically, or to perform a complete scramble, use pamshuffle together  with  pam‐\nflip.  See examples below.\n\nInput is from Standard Input if you don't specify the input file pamfile.\n\nOutput is to Standard Output.\n\npamshuffle  works  on a multi-image stream.  It operates on each image in the stream indepen‐\ndently and produces a multi-image stream output.\n\nThe shuffling algorithm is the widely known  Fisher-Yates method .\n\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "In addition to the options common to all programs based on libnetpbm  (most  notably  -quiet,\nsee  Common Options ), pamshuffle recognizes the following command line options:\n\n\n",
            "subsections": [
                {
                    "name": "-column",
                    "content": "Shuffle  vertical  columns,  i.e. perform the same movement on all rows.  Without this\noption, the program shuffles each row independently.\n\n"
                },
                {
                    "name": "-randomseed",
                    "content": "This is the seed for the random number generator that generates the pixels.\n\nUse this to ensure you get the same image on separate invocations.\n\nBy default, pamshuffle uses a seed derived from the time of day and process ID,  which\ngives you quite uncorrelated results in multiple invocations.\n\n\n\n"
                }
            ]
        },
        "EXAMPLES": {
            "content": "In  the following example, output is to Standard Output.  You will probably want to add redi‐\nrection to somewhere useful.\n\n\n\n•\n\n\npamshuffle is useful when you want to randomize the orderly output of image generators\nsuch as pamseq and pgmramp.\n\nProduce five permutations of integers 0 to 15:\n\npgmramp -lr -maxval=15 16 5 | pamshuffle -plain\n\n\n\n•      Shuffle columns:\n\npamshuffle -column image.ppm\n\n\n\n\n•      Shuffle rows:\n\npamflip -cw image.ppm | pamshuffle | pamflip -ccw\n\n\n\n•      Perform complete shuffle:\n\npamflip -cw image.ppm | pamshuffle | pamflip -ccw | pamshuffle\n\n\n\n\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "pamseq(1), pgmramp(1), pamflip(1), ppmshift(1), ppmspread(1), pam(1)\n\n\n",
            "subsections": []
        },
        "HISTORY": {
            "content": "pamshuffle was new in Netpbm 10.99 (June 2022).\n\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "By Akira F. Urushibata.  Contributed to the public domain by the author.\n",
            "subsections": []
        },
        "DOCUMENT SOURCE": {
            "content": "This manual page was generated by the Netpbm tool 'makeman' from  HTML  source.   The  master\ndocumentation is at\n\nhttp://netpbm.sourceforge.net/doc/pamshuffle.html\n\nnetpbm documentation                                                       Pamshuffle User Manual(1)",
            "subsections": []
        }
    },
    "summary": "pamshuffle - Shuffle pixels of a Netpbm image",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Shuffle vertical columns, i.e. perform the same movement on all rows. Without this option, the program shuffles each row independently."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "This is the seed for the random number generator that generates the pixels. Use this to ensure you get the same image on separate invocations. By default, pamshuffle uses a seed derived from the time of day and process ID, which gives you quite uncorrelated results in multiple invocations."
        }
    ],
    "examples": [
        "In  the following example, output is to Standard Output.  You will probably want to add redi‐",
        "rection to somewhere useful.",
        "•",
        "pamshuffle is useful when you want to randomize the orderly output of image generators",
        "such as pamseq and pgmramp.",
        "Produce five permutations of integers 0 to 15:",
        "pgmramp -lr -maxval=15 16 5 | pamshuffle -plain",
        "•      Shuffle columns:",
        "pamshuffle -column image.ppm",
        "•      Shuffle rows:",
        "pamflip -cw image.ppm | pamshuffle | pamflip -ccw",
        "•      Perform complete shuffle:",
        "pamflip -cw image.ppm | pamshuffle | pamflip -ccw | pamshuffle"
    ],
    "see_also": [
        {
            "name": "pamseq",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pamseq/1/json"
        },
        {
            "name": "pgmramp",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pgmramp/1/json"
        },
        {
            "name": "pamflip",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pamflip/1/json"
        },
        {
            "name": "ppmshift",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ppmshift/1/json"
        },
        {
            "name": "ppmspread",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ppmspread/1/json"
        },
        {
            "name": "pam",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pam/1/json"
        }
    ]
}