Resize

class Resize(outputWidth: Int, outputHeight: Int, interpolation: InterpolationType, renderingSpeed: RenderingSpeed, enableAntialiasing: Boolean) : ImagePreprocessorBase

This image preprocessor defines the Resize operation.

Resize operations creates new image with the following sizes:

The final image quality depends on the following tunable parameters: interpolation, renderingSpeed, enableAntialiasing.

Constructors

Resize
Link copied to clipboard
fun Resize(outputWidth: Int = 100, outputHeight: Int = 100, interpolation: InterpolationType = InterpolationType.BILINEAR, renderingSpeed: RenderingSpeed = RenderingSpeed.MEDIUM, enableAntialiasing: Boolean = true)

Functions

apply
Link copied to clipboard
open override fun apply(image: BufferedImage): BufferedImage

Transforms provided input image.

getOutputShape
Link copied to clipboard
open override fun getOutputShape(inputShape: ImageShape?): ImageShape

Computes output image shape for the provided inputShape.

Properties

enableAntialiasing
Link copied to clipboard
var enableAntialiasing: Boolean = true

The image will be cropped from the right by the given number of pixels.

interpolation
Link copied to clipboard
var interpolation: InterpolationType

Interpolation algorithm.

outputHeight
Link copied to clipboard
var outputHeight: Int = 100

The output height.

outputWidth
Link copied to clipboard
var outputWidth: Int = 100

The output width.

renderingSpeed
Link copied to clipboard
var renderingSpeed: RenderingSpeed

Speed of preprocessing.