Documentation / Node reference / tex nodes
tex/Resize
Makes the image on its input bigger or smaller.
Transform
Gives the image a new size, either as a multiple of its own (scale) or in pixels (size). Shrinking a photo before sending it somewhere, or before a slow node, is the usual reason. The default filter, area, averages everything each new pixel covers, so a big reduction stays smooth instead of turning grainy. Bilinear blends the four nearest pixels, and nearest keeps hard square pixels for pixel art. The result is never smaller than 1 by 1 pixel, and never larger than 8192 pixels a side. It runs on the GPU when there is one, and any tex node can feed it.
Parameters
| Name | Type | What it does |
|---|---|---|
| mode | UInt8 SCALE · SIZE | How the new size is given. Scale multiplies the image's own size, so it follows when the image changes. Size asks for a number of pixels. |
| scale | Float | Used when mode is scale. 0.5 halves the width and the height, 2 doubles them, 1 keeps the size. |
| size | Vector2UInt | Used when mode is size. The width and height in pixels. With keepAspect on, the image is made as large as it can be while fitting inside this size. |
| keepAspect | Bool | Used when mode is size. On, the image keeps its proportions and fits inside the size. Off, it is stretched to exactly that size. |
| filter | UInt8 AREA · BILINEAR · NEAREST | How the new pixels are made from the old ones. Area averages everything a new pixel covers, best for shrinking. Bilinear blends the four nearest pixels. Nearest copies a single pixel, for crisp pixel art. |
See also
- tex/Crop
- tex/Image
This page is generated from the engine, so it describes the release you can download. The same text is in the editor's Help panel next to the node itself.