A new image of width x height. NEAREST picks the closest source pixel. BILINEAR blends the four pixels around each sample point (it does not widen its footprint when shrinking, so use BOX to shrink by much). BOX averages the exact source area under each output pixel. Channels are filtered independently in 14-bit fixed point, so alpha is not premultiplied: colours of transparent pixels bleed into their neighbours. An invalid image or size gives an empty image.
resize :: (
image: Image,
width: s32,
height: s32,
filter := Resize_Filter.BILINEAR
) -> Image
A new image of width x height. NEAREST picks the closest source pixel. BILINEAR blends the four pixels around each sample point (it does not widen its footprint when shrinking, so use BOX to shrink by much). BOX averages the exact source area under each output pixel. Channels are filtered independently in 14-bit fixed point, so alpha is not premultiplied: colours of transparent pixels bleed into their neighbours. An invalid image or size gives an empty image.
Parameters
- image: Image
- width: s32
- height: s32
- filter := Resize_Filter.BILINEAR