ResizerOptions

data class ResizerOptions(val width: Int, val height: Int, val channelOrder: ChannelOrder, val dataType: DataType, val scaleMode: ScaleMode, val pixelLayout: PixelLayout)

Configures options for a Resizer.

val options = ResizerOptions(
width = 192,
height = 192,
channelOrder = ChannelOrder.RGB,
dataType = DataType.FLOAT32,
scaleMode = ScaleMode.COVER,
pixelLayout = PixelLayout.PLANAR,
)

Throws

If width or height is not greater than zero, or if one output buffer would be larger than 2 GB.

Constructors

Link copied to clipboard
constructor(width: Int, height: Int, channelOrder: ChannelOrder, dataType: DataType, scaleMode: ScaleMode, pixelLayout: PixelLayout)

Properties

Link copied to clipboard

Configures the output ChannelOrder the Resizer will write for each resized pixel.

Link copied to clipboard

Configures the scalar DataType the Resizer will use for each output channel.

Link copied to clipboard
val height: Int

Configures the height the Resizer will resize Frames to, in pixels. Must be greater than zero.

Link copied to clipboard

Configures how the individual channels per pixel are arranged in memory:

Link copied to clipboard

Configures the resize behavior when input and output aspect ratios differ:

Link copied to clipboard
val width: Int

Configures the width the Resizer will resize Frames to, in pixels. Must be greater than zero.