LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pgmnoise

create a PGM image filled with random grayscale pixels

TLDR

Create a 100x100 white noise image
$ pgmnoise [100] [100] > [noise.pgm]
copy
Create a full HD noise image
$ pgmnoise [1920] [1080] > [noise.pgm]
copy
Create noise and convert to PNG
$ pgmnoise [256] [256] | pnmtopng > [noise.png]
copy
Create reproducible noise with a fixed seed
$ pgmnoise -randomseed [12345] [100] [100] > [noise.pgm]
copy
Create a small noise tile and repeat it
$ pgmnoise [64] [64] | pnmtile [256] [256] > [texture.pgm]
copy

SYNOPSIS

pgmnoise [options] width height

DESCRIPTION

pgmnoise creates a portable graymap (PGM) image where each pixel is independently assigned a uniformly distributed random gray value between 0 and the maximum value. The output is written to standard output in PGM format.The tool is useful for testing image processing pipelines, creating noise textures, or generating random patterns that can be piped into other Netpbm tools.

PARAMETERS

width

Image width in pixels.
height
Image height in pixels.
-randomseed n
Seed for the random number generator, allowing reproducible output.
-maxval n
Maximum gray value for pixels. Defaults to the PGM compile-time maximum (typically 255 or 65535).

INSTALL

sudo apt install netpbm
copy
sudo dnf install netpbm
copy
sudo pacman -S netpbm
copy
sudo apk add netpbm
copy
sudo zypper install netpbm
copy
brew install netpbm
copy
nix profile install nixpkgs#netpbm
copy

CAVEATS

Uses uniform random distribution only. For Gaussian or other noise types, use pamaddnoise or combine with other tools. Output goes to stdout and must be redirected. Part of the Netpbm toolkit.

HISTORY

pgmnoise is part of Netpbm, the graphics toolkit originally created by Jef Poskanzer in the late 1980s and maintained by Bryan Henderson since 2000.

SEE ALSO

pnmnoise(1), pgmmake(1), ppmforge(1), pnmtopng(1), netpbm(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid