ImageResize

class ImageResize(val width: Int, val height: Int, val interpolation: Interpolation = Interpolation.BILINEAR) : Transform<PlatformBitmapImage, PlatformBitmapImage> (source)

Resizes an image to the specified dimensions.

Usage

val resize = ImageResize(224, 224, Interpolation.BILINEAR)
val resized = resize.apply(originalImage)

Parameters

width

Target width in pixels

height

Target height in pixels

interpolation

The interpolation method (default: BILINEAR)

Constructors

Link copied to clipboard
constructor(width: Int, height: Int, interpolation: Interpolation = Interpolation.BILINEAR)

Properties

Link copied to clipboard
val height: Int
Link copied to clipboard
Link copied to clipboard
val width: Int

Functions

Link copied to clipboard
open override fun apply(input: PlatformBitmapImage): PlatformBitmapImage

Applies this transformation to the given input.

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

Computes the output shape that would result from applying this transform to data with the given input shape.

Link copied to clipboard
open override fun toString(): String