ClassResizeModes

The resampling filters of Image.resize and the other scaling functions: image.resize({ width: 256, mode: ResizeModes.BICUBIC })

Properties

AREA: "area"

Area averaging (box filter): every output pixel is the average of the source pixels it covers. Meant for shrinking

BICUBIC: "bicubic"

Bicubic (Catmull-Rom) resizing, sharper than bilinear, especially when enlarging

BILINEAR: "bilinear"

Bilinear resizing (the default). When shrinking, the filter widens with the scale factor, so every source pixel contributes

NEAREST_NEIGHBOR: "nearest-neighbor"

Use Nearest-neighbor resizing

Deprecated

AUTO: -1

Not a filter: passed as the width or the height, that side follows from the other one, keeping the image's aspect ratio

Pass only the width or the height instead, image.resize({ width: 256 }). AUTO is removed in 4.0