generated

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

image
IMAGE
WIDTH
HEIGHT
measurement
COMBO
width
INT
height
INT
fit
COMBO
method
COMBO
rgthree comfy

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: width and height are target dimensions in pixels.
  • percentage: width and height are 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 measurement before choosing width and height. In percentage mode, values such as 50 mean a relative scale rather than a pixel count.
  • The fit mode matters most when the requested dimensions have a different aspect ratio from the input image. Use crop when the target frame must be completely filled, pad when the full image must be preserved inside a fixed frame, and contain when the image should be scaled to fit without forcing it into the exact target box.
  • Depending on the fit mode and percentage scaling, the final image size may differ from the raw width and height values. 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.

Loading comments…