LinuxCommandLibrary

ppmspread

Randomly displace pixels for noise effect

TLDR

Spread pixels randomly
$ ppmspread [amount] [input.ppm] > [output.ppm]
copy
Light spread effect
$ ppmspread 5 [input.ppm] > [output.ppm]
copy
Heavy spread effect
$ ppmspread 20 [input.ppm] > [output.ppm]
copy

SYNOPSIS

ppmspread amount [file]

DESCRIPTION

ppmspread randomly displaces each pixel in a PPM image to a new position within the specified radius, creating a scattered, noise-like blur effect. Larger spread amounts produce more diffuse results while small amounts add subtle texture.
Unlike Gaussian blur which averages pixels, spread preserves individual pixel colors but randomizes their positions, producing a distinctive frosted glass or pointillist appearance. Part of the Netpbm toolkit.

PARAMETERS

AMOUNT

Spread radius in pixels.
FILE
Input PPM file.

CAVEATS

Only accepts PPM format input. Use pnmtoppm to convert from other formats first. The amount parameter specifies the maximum displacement in any direction; actual displacement for each pixel is random within that range.

SEE ALSO

ppmshift(1), pnmnoise(1), netpbm(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard