Documentation / Node reference / tex nodes
tex/Crop
Keeps a rectangle of the image on its input and drops the rest.
Transform
The result is the part of the image between min and max, measured from its top left corner, and it is exactly that many pixels in size: nothing is stretched or blurred. By default the corners go from 0 to 1 across the image, so the crop keeps framing the same part of the picture when the image changes resolution. Switch units to pixels to give them in pixels instead. Corners outside the image are brought back to its edge. If nothing is left, because max is not beyond min, the node shows an error with the values. It runs on the GPU when there is one, and any tex node can feed it.
Parameters
| Name | Type | What it does |
|---|---|---|
| units | UInt8 FRACTION · PIXELS | What min and max are measured in. Fraction goes from 0 to 1 across the image, so the crop follows a change of resolution. Pixels counts pixels. |
| min | Vector2 | The top left corner of the rectangle to keep. |
| max | Vector2 | The bottom right corner of the rectangle to keep. It must be to the right of and below min. |
See also
- tex/Resize
- 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.