generated

RgthreeImageInsetCrop

RgthreeImageInsetCrop crops an image by insetting from each edge.

Rgthree Image Inset Crop

image
IMAGE
measurement
COMBO
left
INT
right
INT
top
INT
bottom
INT
rgthree comfy

Description

RgthreeImageInsetCrop crops an image by insetting from each edge. Instead of specifying crop coordinates directly, you specify how much to remove from the left, right, top, and bottom. The node supports both pixel and percentage measurements, making it useful for exact pixel crops as well as proportional crops that scale with image size.

Inputs

image

The image to crop. This input is required.

measurement

Controls how the four side values are interpreted. This is a required combo input with two options:

  • Pixels: the side values are treated as pixel counts.
  • Percentage: the side values are treated as percentages rather than raw pixel counts.

left

The inset amount to remove from the left side of the image. This is a required integer value.

The inset amount to remove from the right side of the image. This is a required integer value.

top

The inset amount to remove from the top of the image. This is a required integer value.

bottom

The inset amount to remove from the bottom of the image. This is a required integer value.

Outputs

IMAGE output

The cropped image after the left, right, top, and bottom insets have been applied.

Usage Notes

  • Use Pixels when you need exact, resolution-specific cropping.
  • Use Percentage when you want the crop to remain proportional across images of different sizes.
  • All four side values use the same measurement mode selected in the measurement input.
  • Choose insets that leave a positive crop area: left plus right should be smaller than the image width, and top plus bottom should be smaller than the image height.

Comments

Sign in with GitHub to join the discussion.

Loading comments…
RgthreeImageInsetCrop - ComfyUI-rgthree-comfy | ComfyUI Wiki