InterfaceResizeToOptions

The size for Image.resize, Frame.resize and Animation.resize, and how to resize: a side that is missing follows from the other one, keeping the aspect ratio

interface ResizeToOptions {
    fast?: boolean;
    height?: number;
    mode?: ResizeMode;
    width?: number;
}

Hierarchy (View Summary)

Properties

fast?: boolean

Whether to round to 8 bits between the two passes, so two channels share the multiplications of both: about 15-25% faster for opaque images, with 10-25% of the channel values a step off the precise result (instead of about 1%, never more than 1). Transparent images are premultiplied to 8 bits like browsers do, which makes them about twice as fast: what shows once they're composited differs by up to about 2 steps, pixels that are almost transparent keep less of their color. Only affects ResizeModes.BILINEAR and ResizeModes.AREA, down to about a third of the size. Default: true

height?: number

The new height. Without it, it follows from the width

mode?: ResizeMode

The resizing mode. Default: ResizeModes.BILINEAR

width?: number

The new width. Without it, it follows from the height