Resize

Changes the size of a texture, with a choice of how the picture is scaled to the new frame.

Outputs

NameTypeDescription
OutputTextureThe texture at the new size.

Inputs

NameTypeDescription
InputTextureThe texture to resize.

Parameters

NameTypeDescription
ResolutionVector 2 IntThe width and height of the output in pixels.
ScalingEnumHow the picture is fitted to the new frame.Choices: None, Fit, Fill, Stretch
AnchorEnumThe point of the picture that lies on the same point of the frame, which decides where empty space goes or which part is cut off.Choices: Top Left, Top, Top Right, Left, Center, Right, Bottom Left, Bottom, Bottom Right
FilteradvancedEnumHow a scaled picture is read between its pixels. Nearest keeps hard pixels, and Linear Nice keeps edges next to transparency clean.Choices: Nearest, Linear Fast, Linear Nice
FormatadvancedEnumThe pixel format of the output. Auto keeps the format of the input.

The Resize operator gives a texture a new size in pixels. Use it to match a picture to a screen or to another texture, or to make a chain cheaper: blurring a small texture and scaling the result up costs far less than working at full size.

In None mode, the picture keeps its own pixel size, cut off or with empty space around it. In Fit mode, it is as large as possible while all of it shows, leaving empty bands at two sides like a letterboxed film. In Fill mode, it covers the whole frame and what does not fit is cut off. In Stretch mode, it is distorted to fill the frame exactly. Empty areas are transparent.

See also Crop, Transform.

Keywords: scale, resolution, fit, fill, stretch, letterbox, crop, aspect ratio, downscale, upscale, pixel art, nearest