RgthreeImageResize
The RgthreeImageResize node resizes an input image to a target size. The target can be specified in pixels or as a percentage of the original image.
Rgthree Image Resize
Description
The RgthreeImageResize node resizes an input image to a target size. The target can be specified in pixels or as a percentage of the original image. You can also control how the image is fitted into the requested dimensions and which resampling method is used. The node outputs the resized image together with the resulting dimensions.
Inputs
All inputs are required.
image
The input image to resize. Type: IMAGE.
measurement
Selects how the width and height values are interpreted.
- pixels:
widthandheightare target dimensions in pixels. - percentage:
widthandheightare scale percentages relative to the original image.
width
The target width. When measurement is set to pixels, this is an absolute pixel width. When measurement is set to percentage, this is a percentage of the original image width.
height
The target height. When measurement is set to pixels, this is an absolute pixel height. When measurement is set to percentage, this is a percentage of the original image height.
fit
Controls how the image is fitted to the requested dimensions when the source and target aspect ratios differ.
- crop: fills the target area and crops any part of the image that extends beyond it.
- pad: fits the image inside the target area and pads the remaining space so the output matches the requested dimensions.
- contain: scales the image to fit within the target area while preserving its aspect ratio.
method
Selects the resampling method used during resize. The available choices are defined by the node. Different methods trade speed against quality and can produce different results on detailed, noisy, or pixel-art images.
Outputs
- IMAGE: the resized image.
- INT: the resulting width of the resized image.
- INT: the resulting height of the resized image.
Usage Notes
- Set
measurementbefore choosingwidthandheight. In percentage mode, values such as50mean a relative scale rather than a pixel count. - The
fitmode matters most when the requested dimensions have a different aspect ratio from the input image. Usecropwhen the target frame must be completely filled,padwhen the full image must be preserved inside a fixed frame, andcontainwhen the image should be scaled to fit without forcing it into the exact target box. - Depending on the
fitmode and percentage scaling, the final image size may differ from the rawwidthandheightvalues. The two integer outputs report the resulting dimensions. - For pixel art or images with hard edges, choose a resampling method that avoids unwanted blurring. For photographic content, a smoother method is usually more appropriate.
Comments
Sign in with GitHub to join the discussion.