binarize
Replaces all pixels in a pixmap with black and white depending on their lightness.
Syntax
-
binarize(pm[, x])
-
pm
is a pixmap -
x
is a real number
-
Description
binarize(pm, x)
returns bm
with all pixels with lightness greater than x
replaced by white and all other pixels replaced by black. If omitted, x
defaults to 0.5
.
Examples
binarize(ExampleData("Sally"))