LinuxCommandLibrary

pnmnoise

Generate random color noise images

TLDR

Create color noise image

$ pnmnoise [width] [height] > [noise.ppm]
copy
Create with seed
$ pnmnoise -randomseed [42] [256] [256] > [noise.ppm]
copy
Grayscale noise
$ pnmnoise [100] [100] | ppmtopgm > [noise.pgm]
copy

SYNOPSIS

pnmnoise [options] width height

DESCRIPTION

pnmnoise generates a PNM image filled with random colored pixels. Each pixel has independently random red, green, and blue values, producing visual noise.
Similar to pgmnoise but produces color output.

PARAMETERS

width

Image width in pixels.
height
Image height in pixels.
-randomseed n
Seed for reproducibility.

EXAMPLES

$ # Color noise 512x512
pnmnoise 512 512 > noise.ppm

# Reproducible noise
pnmnoise -randomseed 12345 100 100 > noise.ppm

# Convert to PNG
pnmnoise 200 200 | pnmtopng > noise.png

# Grayscale version
pnmnoise 100 100 | ppmtopgm > gray_noise.pgm
copy

CAVEATS

Produces full color noise (PPM format). For grayscale use pgmnoise. Random distribution is uniform.

HISTORY

pnmnoise is part of Netpbm by Jef Poskanzer and contributors for generating random images.

SEE ALSO

pgmnoise(1), ppmforge(1), ppmmake(1), netpbm(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community