StumpyResize
Constants
DEFAULT_INTERPOLATION_METHOD = InterpolationMethod::Lanczos
VERSION = "1.3.1"
Class methods
blur(image : Canvas, radius : Int32) : Canvas
Sourcecrop(canvas : Canvas, start_x : Int32, start_y : Int32, end_x : Int32, end_y : Int32) : Canvas
Crop function
resize(image : Canvas, new_width : Int32, new_height : Int32, method : InterpolationMethod = DEFAULT_INTERPOLATION_METHOD) : Canvas
Sourceresize_bilinear(image : Canvas, new_image : Canvas) : Nil
Sourceresize_lanczos(image : Canvas, new_image : Canvas) : Nil
Sourceresize_nearest_neighbor(image : Canvas, new_image : Canvas) : Nil
Sourcescale_to_cover(canvas : Canvas, desired_width : Int32, desired_height : Int32, resize_method : InterpolationMethod = DEFAULT_INTERPOLATION_METHOD) : Canvas
scales the original image so that it covers the desired dimensions while maintaining the original aspect ratio. Then it copies the center part of the resized image onto the new canvas, effectively cropping the image.
scale_to_fit(canvas : Canvas, desired_width : Int32, desired_height : Int32, resize_method : InterpolationMethod = DEFAULT_INTERPOLATION_METHOD) : Canvas
scales the image to fit the desired view port, adding letterboxing or pillarboxing as required