ComfyTV/Imagegenerated
Crop(CropStage)
The Crop node (CropStage) extracts a rectangular region from a COMFYTV_IMAGE.
Crop Stage
image
image
crop_x
0
crop_y
0
crop_w
0
crop_h
0
ComfyTV
Description
The Crop node (CropStage) extracts a rectangular region from a COMFYTV_IMAGE. You define the region by its top-left corner using crop_x and crop_y, and by its size using crop_w and crop_h. The result is returned as a new COMFYTV_IMAGE containing only the selected area.
This node is useful for isolating part of an image, such as a subject, sprite, UI element, or any other region that needs to be processed separately in a ComfyTV workflow.
Inputs
| Input | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
crop_x | INT | Yes | 0 | 0 to 8192 | Horizontal offset in pixels from the left edge of the source image. A value of 0 starts the crop at the left edge. |
crop_y | INT | Yes | 0 | 0 to 8192 | Vertical offset in pixels from the top edge of the source image. A value of 0 starts the crop at the top edge. |
crop_w | INT | Yes | 0 | 0 to 8192 | Width in pixels of the region to keep. This is the size of the crop, not the right edge coordinate. |
crop_h | INT | Yes | 0 | 0 to 8192 | Height in pixels of the region to keep. This is the size of the crop, not the bottom edge coordinate. |
image | COMFYTV_IMAGE | No | None | - | The source image to crop. When connected, the node extracts the requested region from this image. Because the input is optional, a workflow can exist without an image connected, but a source image is needed to produce a meaningful cropped result. |
Outputs
| Output | Type | Description |
|---|---|---|
IMAGE | COMFYTV_IMAGE | The cropped image region. The output uses the same COMFYTV_IMAGE type as the input, so it can be connected to other ComfyTV nodes that accept images. |
Usage Notes
crop_xandcrop_ylocate the top-left corner of the crop region. They are offsets from the original image, not absolute canvas coordinates.crop_wandcrop_hdefine the width and height of the region to extract. They do not represent the bottom-right corner position.- All crop values are integer pixel values and are constrained to the range 0 to 8192.
- The default value for all crop controls is 0. Set
crop_wandcrop_hexplicitly when you want a non-empty crop region; leaving the size values at 0 may produce an empty or zero-sized result depending on the surrounding workflow. - The
imageinput is optional in the node definition. Connect aCOMFYTV_IMAGEto supply the source image that should be cropped. - The node category is
ComfyTV/Image, so it is grouped with other image-processing stages in the ComfyTV package.
Comments
Sign in with GitHub to join the discussion.