Transform
Move, scale, rotate, crop and mirror a stream, and set the output size. Also the resize node.
- Video
- Since 0.2.0
- transform
- resize
- crop
Transform moves, scales, rotates, crops and mirrors a stream, and sets its output size.
What it does#
Position, scale, rotation and crop change how the picture sits inside the frame. Width and Height set the output size; 0 keeps the input size, so it is also the resize node. It processes every stream of the input at that stream's size and keeps the stream count.
When to use it#
Use it to fit a source to a layout, flip a camera, or shrink a stream before a Composite.
Ports#
| Port | Direction | Signal | Lanes |
|---|---|---|---|
video | Input | Video | Inferred from the cable |
video | Output | Video | Inferred from the cable |
Parameters#
| Parameter | Label | Range | Default | Unit | Scale | Notes |
|---|---|---|---|---|---|---|
x | X | -1 to 1 | 0 | linear | Horizontal offset as a fraction of the output width. | |
y | Y | -1 to 1 | 0 | linear | Vertical offset as a fraction of the output height. | |
scale | Scale | 0.05 to 8 | 1 | × | log | Uniform scale about the centre. |
rotation | Rotation | -180 to 180 | 0 | ° | linear | Rotation about the centre. |
crop | Crop | 0 to 0.49 | 0 | linear | Fraction trimmed from every edge before scaling. | |
mirror_h | Mirror | 0 to 1 | 0 | linear | Flip horizontally. Choices: 0 Off, 1 On. | |
mirror_v | Flip | 0 to 1 | 0 | linear | Flip vertically. Choices: 0 Off, 1 On. | |
width | Width | 0 to 3840 | 0 | px | linear | Output width in pixels; 0 keeps the source width. |
height | Height | 0 to 2160 | 0 | px | linear | Output height in pixels; 0 keeps the source height. |
X (x)#
Horizontal offset from -1 to 1.
Y (y)#
Vertical offset from -1 to 1.
Scale (scale)#
Zoom from 0.05 to 8 times; 1 is unchanged. Logarithmic.
Rotation (rotation)#
Rotation in degrees.
Crop (crop)#
Trims each edge, from 0 to 0.49 of the picture.
Mirror (mirror_h)#
Flips the picture left to right when on.
Flip (mirror_v)#
Flips the picture top to bottom when on.
Width (width)#
Output width in pixels; 0 keeps the input width.
Height (height)#
Output height in pixels; 0 keeps the input height.
Tips#
- Set Width and Height once to fix a Toy's output size.
- Video needs the browser's WebGPU video engine. The Player and exports do not run video yet and report it unavailable. To see a video output, bind a live Screen in the Frame to it.
See also#
Composite, Pixelate, Camera, Video, Control lanes.
Help patches
Each help patch is an ordinary Toy that teaches one idea. The diagram shows the Patch; the preview shows its Frame. Open it in TuneToys to play and edit it.
1. Move, scale and rotate
beginner Teaches: x, y, scale, rotation, crop, mirror_h, mirror_v
Camera through the transform node.
Connections as text
- Camera video output connected to Transform video input
- Width and height set the output size; 0 keeps the input size.
- Scale is logarithmic.
Related nodes
- Composite Stack up to four layers over a base at the base's size with blend mode, opacity, position and scale per layer.
- Pixelate Mosaic cells and posterised levels for a chunky look.
- Camera A camera feed as one video stream. The Toy names a logical camera; the host binds it to a device after the person allows it.