ImageCrop

class ImageCrop(val top: Int = 0, val bottom: Int = 0, val left: Int = 0, val right: Int = 0) : Transform<PlatformBitmapImage, PlatformBitmapImage> (source)

Crops an image by removing pixels from the edges.

Usage

val crop = ImageCrop(top = 10, bottom = 10, left = 10, right = 10)
val cropped = crop.apply(originalImage)

Parameters

top

Pixels to remove from top

bottom

Pixels to remove from bottom

left

Pixels to remove from left

right

Pixels to remove from right

Constructors

Link copied to clipboard
constructor(top: Int = 0, bottom: Int = 0, left: Int = 0, right: Int = 0)

Properties

Link copied to clipboard
val bottom: Int
Link copied to clipboard
val left: Int
Link copied to clipboard
val right: Int
Link copied to clipboard
val top: 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