Module imageops

Source
Expand description

Image Processing Functions

Re-exports§

pub use self::sample::FilterType::CatmullRom;
pub use self::sample::FilterType::Gaussian;
pub use self::sample::FilterType::Lanczos3;
pub use self::sample::FilterType::Nearest;
pub use self::sample::FilterType::Triangle;
pub use self::colorops::brighten;
pub use self::colorops::contrast;
pub use self::colorops::dither;
pub use self::colorops::grayscale;
pub use self::colorops::grayscale_alpha;
pub use self::colorops::grayscale_with_type;
pub use self::colorops::grayscale_with_type_alpha;
pub use self::colorops::huerotate;
pub use self::colorops::index_colors;
pub use self::colorops::invert;
pub use self::colorops::BiLevel;
pub use self::colorops::ColorMap;

Modules§

colorops
Functions for altering and converting the color of pixelbufs

Enums§

FilterType
Available Sampling Filters.

Functions§

blur
Image sampling Performs a Gaussian blur on the supplied image. sigma is a measure of how much to blur by. Use crate::imageops::fast_blur() for a faster but less accurate version.
crop
Return a mutable view into an image The coordinates set the position of the top left corner of the crop.
crop_imm
Return an immutable view into an image The coordinates set the position of the top left corner of the crop.
fast_blur
Approximation of Gaussian blur after Kovesi, P.: Fast Almost-Gaussian Filtering The Australian Pattern Recognition Society Conference: DICTA 2010. December 2010. Sydney.
filter3x3
Image sampling Perform a 3x3 box filter on the supplied image. kernel is an array of the filter weights of length 9.
flip_horizontal
Affine transformations Flip an image horizontally
flip_horizontal_in
Affine transformations Flip an image horizontally and put the result into the destination ImageBuffer.
flip_horizontal_in_place
Affine transformations Flip an image horizontally in place.
flip_vertical
Affine transformations Flip an image vertically
flip_vertical_in
Affine transformations Flip an image vertically and put the result into the destination ImageBuffer.
flip_vertical_in_place
Affine transformations Flip an image vertically in place.
horizontal_gradient
Fill the image with a linear horizontal gradient
interpolate_bilinear
Image sampling Linearly sample from an image using coordinates in [0, w-1] and [0, h-1].
interpolate_nearest
Image sampling Sample from an image using coordinates in [0, w-1] and [0, h-1], taking the nearest pixel.
overlay
Overlay an image at a given coordinate (x, y)
overlay_bounds
Calculate the region that can be copied from top to bottom.
replace
Replace the contents of an image at a given coordinate (x, y)
resize
Image sampling Resize the supplied image to the specified dimensions. nwidth and nheight are the new dimensions. filter is the sampling filter to use.
rotate90
Affine transformations Rotate an image 90 degrees clockwise.
rotate90_in
Affine transformations Rotate an image 90 degrees clockwise and put the result into the destination ImageBuffer.
rotate180
Affine transformations Rotate an image 180 degrees clockwise.
rotate270
Affine transformations Rotate an image 270 degrees clockwise.
rotate180_in
Affine transformations Rotate an image 180 degrees clockwise and put the result into the destination ImageBuffer.
rotate180_in_place
Affine transformations Rotate an image 180 degrees clockwise in place.
rotate270_in
Affine transformations Rotate an image 270 degrees clockwise and put the result into the destination ImageBuffer.
sample_bilinear
Image sampling Linearly sample from an image using coordinates in [0, 1].
sample_nearest
Image sampling Sample from an image using coordinates in [0, 1], taking the nearest coordinate.
thumbnail
Image sampling Resize the supplied image to the specific dimensions.
tile
Tile an image by repeating it multiple times
unsharpen
Image sampling Performs an unsharpen mask on the supplied image. sigma is the amount to blur the image by. threshold is the threshold for minimal brightness change that will be sharpened.
vertical_gradient
Fill the image with a linear vertical gradient