EasyUse/Imagegenerated

imageUncropFromBBOX

imageUncropFromBBOX places a previously cropped image back onto its original image using a bounding box.

image Uncrop From BBOX

original_image
crop_image
bbox
optional_mask
image
border_blending
0.25
use_square_mask
Easy Use

Description

imageUncropFromBBOX places a previously cropped image back onto its original image using a bounding box. It is designed to be used with cropping or BBOX-producing workflows: crop a region, process it, then paste it back onto the original canvas at the correct location.

The node also gives you control over how the pasted crop blends with the surrounding original image, and whether the paste region is treated as a full rectangle or as an arbitrary shape defined by an optional mask.

Inputs

NameTypeDefaultDescription
original_imageIMAGEThe full-size image that the crop will be pasted back onto.
crop_imageIMAGEThe image region to paste back. It should correspond to the area defined by bbox.
bboxBBOXThe bounding box that locates the crop within original_image. Use a BBOX output from a BBOX-producing node.
border_blendingFLOAT0.25Controls how strongly the edges of the pasted crop blend into the original image. Range is 0.0 to 1.0. A value of 0 creates a hard edge; higher values produce a softer transition.
use_square_maskBOOLEANTrueWhen enabled, the pasted region is treated as a filled rectangle covering the whole bounding box. Disable this when you need to preserve a non-rectangular shape supplied by optional_mask.
optional_maskMASKNoneOptional mask used when use_square_mask is disabled. It defines which parts of the crop image should be pasted and how the edges should be handled.

Outputs

NameTypeDescription
IMAGEIMAGEThe composite result: the original image with crop_image pasted back at the specified bounding box, using the selected blending behavior.

Usage Notes

  • bbox expects a BBOX object, not raw coordinates. Use a BBOX output from another node that produces this type.
  • The bounding box coordinates refer to the pixel space of original_image. The crop_image should be the exact region extracted from that bounding box.
  • Keep use_square_mask enabled for straightforward rectangular composites, such as pasting back a fixed-size crop or inpainting result.
  • If your crop came from a masked area or has an irregular shape, set use_square_mask to False and provide optional_mask to control the paste shape.
  • border_blending is a normalized value between 0 and 1, so even small changes can noticeably affect how visible the seam between the crop and original image is.

Comments

Sign in with GitHub to join the discussion.

Loading comments…