EasyUse/Imagegenerated
ImageInsetCrop(imageInsetCrop)
ImageInsetCrop crops an image by removing a specified amount from each side, letting you trim borders, margins, or unwanted edges.
image Inset Crop
image
IMAGE
measurement
COMBO
left
INT
right
INT
top
INT
bottom
INT
Easy Use
ImageInsetCrop crops an image by removing a specified amount from each side, letting you trim borders, margins, or unwanted edges. The crop amount can be expressed either in absolute pixels or as a percentage of the original image dimensions.
Inputs
image(IMAGE): The input image to crop.measurement(COMBO): Selects the unit for the inset values.Pixelsuses absolute pixel distances;Percentageuses percentages of the original image dimensions.left(INT): The amount to remove from the left edge of the image.right(INT): The amount to remove from the right edge of the image.top(INT): The amount to remove from the top edge of the image.bottom(INT): The amount to remove from the bottom edge of the image.
When measurement is set to Percentage, left and right are calculated from the original image width, while top and bottom are calculated from the original image height.
Outputs
- IMAGE: The cropped image after the specified insets are removed.
Usage Notes
- Use positive integer values for the inset amounts.
- The resulting width is approximately
original_width - (left + right), and the resulting height is approximatelyoriginal_height - (top + bottom), after applying the selected measurement mode. - In
Percentagemode, the values represent percentages of the original dimension for that axis. For example, on a 1000px-wide image,left: 20andright: 10would remove 200px from the left and 100px from the right, leaving a 700px-wide result. - Make sure the combined left and right insets are smaller than the image width, and the combined top and bottom insets are smaller than the image height, or there will be no valid crop area left.
- This node only removes pixels from the edges; it does not scale, pad, or otherwise resize the cropped result.
Comments
Sign in with GitHub to join the discussion.