Crop Activity
The Crop activity enables users to extract a specific rectangular portion from an image. It processes the input image based on defined coordinates and dimensions, saving the result as a new output image.
| Field | Description | Requirement |
|---|---|---|
| Input Image | Path and filename of the image to be processed. | Required |
| Output Image | Path and filename for the processed output image. | Required |
| X-coordinate | The X-coordinate (horizontal position) of the top-left corner of the cropping area. | Optional |
| Y-coordinate | The Y-coordinate (vertical position) of the top-left corner of the cropping area. | Optional |
| Width | The width of the cropping area in pixels. | Optional |
| Height | The height of the cropping area in pixels. | Optional |
Action Types & Examples
Input Image
- Format: string (file path)
- Example Result:
C:\Robusta\robusta.jpg
Output Image
- Format: string (file path)
- Example Result:
C:\Robusta\cropped_image.jpg
X-coordinate
- Format: digit (integer)
- Example Result:
120
Y-coordinate
- Format: digit (integer)
- Example Result:
250
Width
- Format: digit (integer)
- Example Result:
100
Height
- Format: digit (integer)
- Example Result:
50
Implementation Examples
Field Setup - Input Image: C:\Robusta\robusta.jpg - Output Image: C:\Robusta\cropped_image.jpg - X-coordinate: 120 - Y-coordinate: 250 - Width: 100 - Height: 50
Execution Parameters - Input Image: C:\Robusta\robusta.jpg - Output Image: C:\Robusta\cropped_image.jpg - X-coordinate: 120 - Y-coordinate: 250 - Width: 100 - Height: 50
Technical Notes
The cropping operation uses a standard Cartesian coordinate system where the origin (0,0) is at the top-left corner of the image. X-coordinates increase to the right, and Y-coordinates increase downwards. Ensure the specified coordinates and dimensions are within the bounds of the input image to avoid errors or unexpected results.