{
    "content": [
        {
            "type": "text",
            "text": "# pbmnoise (man)\n\n## NAME\n\npbmnoise - create a PBM image made up of white noise\n\n## SYNOPSIS\n\npbmnoise width height\n[-ratio=M/N] [-pack] [-randomseed=integer] [-endian=]{big|little|native|swap}]\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## DESCRIPTION\n\nThis program is part of Netpbm(1).\n\n## TLDR\n\n> Generate white noise.\n\n- Generate a PGM image containing white noise:\n  `pbmnoise {{width}} {{height}} > {{path/to/output.pbm}}`\n- Specify the seed for the pseudo-random number generator:\n  `pbmnoise {{width}} {{height}} -randomseed {{value}} > {{path/to/output.pbm}}`\n- Specify the desired rate of white to black pixels:\n  `pbmnoise {{width}} {{height}} -ratio {{1/3}} > {{path/to/output.pbm}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (4 subsections)\n- **EXAMPLES**\n- **SEE ALSO**\n- **HISTORY**\n- **AUTHOR**\n- **DOCUMENT SOURCE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "pbmnoise",
        "section": "",
        "mode": "man",
        "summary": "pbmnoise - create a PBM image made up of white noise",
        "synopsis": "pbmnoise width height\n[-ratio=M/N] [-pack] [-randomseed=integer] [-endian=]{big|little|native|swap}]\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.",
        "tldr_summary": "Generate white noise.",
        "tldr_examples": [
            {
                "description": "Generate a PGM image containing white noise",
                "command": "pbmnoise {{width}} {{height}} > {{path/to/output.pbm}}"
            },
            {
                "description": "Specify the seed for the pseudo-random number generator",
                "command": "pbmnoise {{width}} {{height}} -randomseed {{value}} > {{path/to/output.pbm}}"
            },
            {
                "description": "Specify the desired rate of white to black pixels",
                "command": "pbmnoise {{width}} {{height}} -ratio {{1/3}} > {{path/to/output.pbm}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "The proportion of black pixels in the generated image. To be precise, this is the probability that any given pixel will be black. By the law of large numbers, we can expect the proportion of black pixels in a reasonably large image to be close to this fraction. The option value is a fraction. The denominator must be 1 or an integer power of 2 up to 65536. the numerator must be 0 or a positive integer not exceeding denominator. The default is 1/2, meaning the output image has essentially the same number of black and white pixels. If the ratio is 0 the output image is entirely white. If 1, the output is entirely black."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "ends by default. When this option is specified, the unused pixels are carried over to the next row, eliminating waste in exchange for some overhead cost. Using this option improves performance when the image width is small."
            },
            {
                "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, pbmnoise uses a seed derived from the time of day and process ID, which gives you fairly uncorrelated results in multiple invocations."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "pbmnoise internally generates random 32-bit integers and uses the machine's binary en‐ coding of those integers as strings of pixels. Because the integers are random, it doesn't normally matter what binaary encoding is used for them, but if you need con‐ sistent results between machines using the same random number generator, it matters. For that reason (mainly for testing the program), this option lets you control that encoding, between big-endian and little-endian. mode is one of the following: big Force big-endian output by rearranging bytes on little-endian machines. No effect on big-endian machines. little Likewise, force little-endian output. native Do not rearrange anything. This is the default. swap Always swap regardless of system endianness."
            }
        ],
        "examples": [
            "This generates a random PBM image with roughly one-third of pixels colored black:",
            "pbmnoise -ratio=11/32 1200 1200 > random.pbm",
            "The following is an alternate method for generating a random PBM image  which  uses  pgmnoise",
            "and pgmtopbm instead of pbmnoise.  It is less efficient.",
            "pgmnoise -maxval=100 1200 1200 | \\",
            "pgmtopbm -threshold -value=0.333 > random.pbm",
            "This generates a random PPM image, maxval 1:",
            "pbmnoise 600 400 > red.pbm",
            "pbmnoise 600 400 > green.pbm",
            "pbmnoise 600 400 > blue.pbm",
            "rgb3topbm red.pbm green.pbm blue.pbm > random.ppm"
        ],
        "see_also": [
            {
                "name": "pbm",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pbm/1/json"
            },
            {
                "name": "pgmnoise",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pgmnoise/1/json"
            },
            {
                "name": "pgmtopbm",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pgmtopbm/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 5,
                "subsections": [
                    {
                        "name": "-ratio=_",
                        "lines": 16
                    },
                    {
                        "name": "-pack",
                        "lines": 6
                    },
                    {
                        "name": "-randomseed=_",
                        "lines": 8
                    },
                    {
                        "name": "-endian=_",
                        "lines": 27
                    }
                ]
            },
            {
                "name": "EXAMPLES",
                "lines": 16,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "HISTORY",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DOCUMENT SOURCE",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "pbmnoise - create a PBM image made up of white noise\n\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "pbmnoise width height\n\n[-ratio=M/N] [-pack] [-randomseed=integer] [-endian=]{big|little|native|swap}]\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\npbmnoise creates a PBM image with random pixels.  You specify the probability each pixel will\nbe black or white (essentially, the proportion of black to white pixels in the image).\n\nYou specify the dimensions of the image with the width and height arguments.\n\n\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "In  addition  to  the options common to all programs based on libnetpbm (most notably -quiet,\nsee \u001b]8;;index.html#commonoptions\u001b\\ Common Options\u001b]8;;\u001b\\ ), pbmnoise recognizes the following command line options:\n\n\n",
                "subsections": [
                    {
                        "name": "-ratio=_",
                        "content": "The proportion of black pixels in the generated image.\n\nTo be precise, this is the probability that any given pixel will be black.  By the law\nof large numbers, we can expect the proportion of black pixels in a  reasonably  large\nimage to be close to this fraction.\n\nThe option value is a fraction.  The denominator must be 1 or an integer power of 2 up\nto 65536.  the numerator must be 0 or a positive integer not exceeding denominator.\n\nThe  default is 1/2, meaning the output image has essentially the same number of black\nand white pixels.\n\nIf the ratio is 0 the output image is entirely white.  If 1, the  output  is  entirely\nblack.\n\n"
                    },
                    {
                        "name": "-pack",
                        "content": "ends by default.  When this option is specified, the unused pixels are carried over to\nthe next row, eliminating waste in exchange for some overhead cost.\n\nUsing this option improves performance when the image width is small.\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, pbmnoise uses a seed derived from the time of day and  process  ID,  which\ngives you fairly uncorrelated results in multiple invocations.\n\n"
                    },
                    {
                        "name": "-endian=_",
                        "content": "pbmnoise internally generates random 32-bit integers and uses the machine's binary en‐\ncoding  of  those  integers as strings of pixels.  Because the integers are random, it\ndoesn't normally matter what binaary encoding is used for them, but if you  need  con‐\nsistent  results  between machines using the same random number generator, it matters.\nFor that reason (mainly for testing the program), this option lets  you  control  that\nencoding, between big-endian and little-endian.\n\nmode is one of the following:\n\n\n\nbig    Force  big-endian output by rearranging bytes on little-endian machines.  No effect on\nbig-endian machines.\n\n\nlittle Likewise, force little-endian output.\n\n\nnative Do not rearrange anything.  This is the default.\n\n\nswap   Always swap regardless of system endianness.\n\n\n\n\n"
                    }
                ]
            },
            "EXAMPLES": {
                "content": "This generates a random PBM image with roughly one-third of pixels colored black:\npbmnoise -ratio=11/32 1200 1200 > random.pbm\n\nThe following is an alternate method for generating a random PBM image  which  uses  pgmnoise\nand pgmtopbm instead of pbmnoise.  It is less efficient.\npgmnoise -maxval=100 1200 1200 | \\\npgmtopbm -threshold -value=0.333 > random.pbm\n\nThis generates a random PPM image, maxval 1:\npbmnoise 600 400 > red.pbm\npbmnoise 600 400 > green.pbm\npbmnoise 600 400 > blue.pbm\nrgb3topbm red.pbm green.pbm blue.pbm > random.ppm\n\n\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "pbm(1) pgmnoise(1) pgmtopbm(1)\n\n",
                "subsections": []
            },
            "HISTORY": {
                "content": "pbmnoise was new in Netpbm 10.97 (December 2021).\n\nIn Netpbm before that, you can use pgmnoise.\n\n\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Akira  F  Urushibata  wrote  this program and contributed it to the public domain in December\n2021.\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/pbmnoise.html\n\nnetpbm documentation                      18 December 2021                   Pbmnoise User Manual(1)",
                "subsections": []
            }
        }
    }
}