Crop Image
Crop an image to a specified rectangular region
Crop
Crop an image to a specified rectangular region
Overview
The Crop node extracts a specific rectangular region from an image by defining a starting point (top-left corner) and dimensions (width and height). This gives you precise control over which part of the image to keep.
Usage Tips
- Specify exact pixel coordinates for the top-left corner (start_x, start_y)
- Define the width and height of the region to extract
- Use for extracting logos, watermarks, or specific image regions
- Great for removing unwanted borders or focusing on specific areas
- Combine with Image Attributes to calculate crop coordinates dynamically
Common Pairings
- Image Attributes - Get image dimensions to calculate crop regions
- Size Maths - Calculate crop coordinates based on percentages
- Smart Crop - Use smart crop first, then precise crop for fine-tuning
- Resize - Scale the cropped region to desired final dimensions
Gotchas
- Coordinates start from (0, 0) at the top-left corner
- If crop region exceeds image bounds, dimensions are auto-adjusted to fit
- Unlike Smart Crop, this requires you to specify exact coordinates
- Use Image Attributes node to get source image dimensions if needed
Technical Reference
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
input | Image | Yes | Image to crop |
Outputs
| Name | Type | Description |
|---|---|---|
output | Image | Cropped image |
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
params_start_x | number | 0 | X coordinate of top-left corner |
params_start_y | number | 0 | Y coordinate of top-left corner |
params_width | number | 100 | Width of crop region in pixels |
params_height | number | 100 | Height of crop region in pixels |