Resize
Changes the size of a texture, with a choice of how the picture fits the new frame.
Outputs
| Name | Type | Description |
|---|---|---|
| Texture Output | Texture | The texture at the new size. |
Inputs
| Name | Type | Description |
|---|---|---|
| Texture Input | Texture | The texture to resize. |
Parameters
| Name | Type | Description |
|---|---|---|
| Output Size | Vector 2 Int | The width and height of the output in pixels. |
| Fit Mode | Enum | How the picture is placed in the new frame when the proportions differ.Choices: Stretch, Fit, Fill, Center |
| Horizontal Align | Enum | Where the picture sits across when it does not fill the frame.Choices: Left, Center, Right |
| Vertical Align | Enum | Where the picture sits down when it does not fill the frame.Choices: Top, Center, Bottom |
Resize gives a texture a new size in pixels. When the new frame has the same proportions as the picture every mode gives the same result. When they differ, the fit mode decides. Stretch distorts the picture to fill the frame. Fit scales it to be as large as possible while showing all of it, leaving empty bands at two sides like a letterboxed film. Fill scales it to cover the whole frame and cuts off what does not fit. Center does not scale at all and shows the picture at its own pixel size, cut off or with empty space around it.
The alignment places the picture in the frame whenever there is room left, or decides which part is cut off when there is not. Empty areas are transparent. The output has the same channels as the input.
Resize is also the way to make a chain cheaper. Blurring or distorting a small texture and resizing the result up afterwards costs far less than working at full size.
Keywords: scale, resolution, fit, fill, letterbox, crop, aspect ratio, downscale