Algosim documentation: DistortColor

DistortColor

Returns a pixmap with its colour randomly perturbed per pixel.

Syntax

r, g, and b are non-negative integers

Description

DistortColor(pm, r, g, b) returns pm with the colour of each pixel randomly distorted. Specifically, each 0..255 RGB component of each pixel is randomly translated by an amount of at most r, g, and b, respectively.

If omitted, g defaults to r and b to g.

Examples

DistortColor(ExampleData("rabbit"), 0, 75, 0)

Image 1

See also