Expand description
Functions and filters for the sampling of pixels.
Structsยง
- Filter ๐A Representation of a separable filter.
- FloatNearest ๐
- ThumbnailSum ๐Local struct for keeping track of pixel sums for fast thumbnail averaging
Enumsยง
- Available Sampling Filters.
Functionsยง
- bc_cubic_spline ๐
- Performs a Gaussian blur on the supplied image.
sigma
is a measure of how much to blur by. - box_kernel ๐Calculate the box kernel. Only pixels inside the box should be considered, and those contribute equally. So this method simply returns 1.
- catmullrom_kernel ๐Calculate the Catmull-Rom cubic spline. Also known as a form of
BiCubic
sampling in two dimensions. - Perform a 3x3 box filter on the supplied image.
kernel
is an array of the filter weights of length 9. - gaussian ๐The Gaussian Function.
r
is the standard deviation. - gaussian_kernel ๐Calculate the gaussian function with a standard deviation of 0.5
- horizontal_sample ๐
- Linearly sample from an image using coordinates in [0, w-1] and [0, h-1].
- Sample from an image using coordinates in [0, w-1] and [0, h-1], taking the nearest pixel.
- lanczos ๐
- lanczos3_kernel ๐Calculate the lanczos kernel with a window of 3
- Resize the supplied image to the specified dimensions.
nwidth
andnheight
are the new dimensions.filter
is the sampling filter to use. - Linearly sample from an image using coordinates in [0, 1].
- Sample from an image using coordinates in [0, 1], taking the nearest coordinate.
- sinc ๐
- Resize the supplied image to the specific dimensions.
- Get a pixel for a thumbnail where the input window encloses at least a full pixel.
- Get a single pixel for a thumbnail where the input window does not enclose any full pixel.
- Get a thumbnail pixel where the input window encloses at least a vertical pixel.
- Get a thumbnail pixel where the input window encloses at least a horizontal pixel.
- triangle_kernel ๐Calculate the triangle function. Also known as
BiLinear
sampling in two dimensions. - 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_sample ๐