Module map

Source
Expand description

Functions for mapping over pixels, colors or subpixels of images.

Traits§

WithChannel
The type obtained by replacing the channel type of a given Pixel type. The output type must have the same name of channels as the input type, or several algorithms will produce incorrect results or panic.

Functions§

as_blue_channel
Creates an RGB image by embedding a grayscale image in its blue channel.
as_green_channel
Creates an RGB image by embedding a grayscale image in its green channel.
as_red_channel
Creates an RGB image by embedding a grayscale image in its red channel.
blue_channel
Creates a grayscale image by extracting the blue channel of an RGB image.
green_channel
Creates a grayscale image by extracting the green channel of an RGB image.
map_colors
Applies f to the color of each pixel in the input image.
map_colors2
Applies f to the colors of the pixels in the input images.
map_colors_mut
Applies f to the color of each pixel in the input image in place.
map_pixels
Applies f to each pixel in the input image.
map_pixels_mut
Applies f to each pixel in the input image in place.
map_subpixels
Applies f to each subpixel of the input image.
map_subpixels_mut
Applies f to each subpixel of the input image in place.
red_channel
Creates a grayscale image by extracting the red channel of an RGB image.

Type Aliases§

ChannelMap
Alias to make uses of WithChannel less syntactically noisy.