ImagePad

class ImagePad(val top: Int = 0, val bottom: Int = 0, val left: Int = 0, val right: Int = 0, val red: Int = 0, val green: Int = 0, val blue: Int = 0) : Transform<PlatformBitmapImage, PlatformBitmapImage> (source)

Pads an image by adding pixels to the edges.

Usage

val pad = ImagePad(top = 10, bottom = 10, left = 10, right = 10)
val padded = pad.apply(originalImage)

Parameters

top

Pixels to add at top

bottom

Pixels to add at bottom

left

Pixels to add at left

right

Pixels to add at right

red

Red component of padding color (0-255)

green

Green component of padding color (0-255)

blue

Blue component of padding color (0-255)

Constructors

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

Properties

Link copied to clipboard
val blue: Int
Link copied to clipboard
val bottom: Int
Link copied to clipboard
val green: Int
Link copied to clipboard
val left: Int
Link copied to clipboard
val red: 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