Contains extension methods for CanvasImage.
Methods
public static CanvasImage BicubicResampler(CanvasImage image)
Uses a bicubic sampler that implements the bicubic kernel algorithm W(x).
Parameters:
image (CanvasImage)Returns:
The same instance so that multiple calls can be chained.
public static CanvasImage BilinearResampler(CanvasImage image)
Uses a bilinear sampler. This interpolation algorithm can be used where perfect image transformation with pixel matching is impossible, so that one can calculate and assign appropriate intensity values to pixels.
Parameters:
image (CanvasImage)Returns:
The same instance so that multiple calls can be chained.
public static CanvasImage MaxWidth(CanvasImage image, int? maxWidth)
Sets the maximum width of the rendered image.
Parameters:
image (CanvasImage)maxWidth (int?)Returns:
The same instance so that multiple calls can be chained.
public static CanvasImage NearestNeighborResampler(CanvasImage image)
Uses a Nearest-Neighbour sampler that implements the nearest neighbor algorithm. This uses a very fast, unscaled filter which will select the closest pixel to the new pixels position.
Parameters:
image (CanvasImage)Returns:
The same instance so that multiple calls can be chained.
public static CanvasImage NoMaxWidth(CanvasImage image)
Disables the maximum width of the rendered image.
Parameters:
image (CanvasImage)Returns:
The same instance so that multiple calls can be chained.
public static CanvasImage PixelWidth(CanvasImage image, int width)
Sets the pixel width.
Parameters:
image (CanvasImage)width (int)Returns:
The same instance so that multiple calls can be chained.