ResizerOptions

interface ResizerOptions

Configures options for a Resizer.

Properties

channelOrder

channelOrder: ChannelOrder

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


dataType

dataType: DataType

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


height

height: number

Configures the height the Resizer will resize Frames to.


pixelLayout

pixelLayout: PixelLayout

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

  • Use 'interleaved' if your ML model input tensor is (N)HWC shaped - e.g.: [1, H, W, 3]
  • Use 'planar' if your ML model input tensor is (N)CHW shaped - e.g.: [1, 3, H, W].

See

PixelLayout


scaleMode

scaleMode: ScaleMode

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

  • 'cover': Perform a centered crop to fill the full output.
  • 'contain': Keep the full source image and pad remaining output areas with black bars.

width

width: number

Configures the width the Resizer will resize Frames to.