> ## Documentation Index
> Fetch the complete documentation index at: https://learn.workflow.dog/llms.txt
> Use this file to discover all available pages before exploring further.

# Crop Image

> Extract a rectangular region from an image by pixel coordinates.

**Crop Image** extracts a rectangle from an image. Coordinates start at the
source image's top-left corner.

| Direction | Field             | Type                 | Description                                                    |
| --------- | ----------------- | -------------------- | -------------------------------------------------------------- |
| Input     | **Image**         | File                 | The source image.                                              |
| Input     | **Left**          | Non-negative integer | Pixels from the source's left edge to the crop's left edge.    |
| Input     | **Top**           | Non-negative integer | Pixels from the source's top edge to the crop's top edge.      |
| Input     | **Width**         | Positive integer     | Width of the crop rectangle in pixels.                         |
| Input     | **Height**        | Positive integer     | Height of the crop rectangle in pixels.                        |
| Output    | **Cropped Image** | File                 | The extracted region, preserving the input name and MIME type. |

The full rectangle must fit inside the source image:

```text theme={null}
left + width  ≤ source width
top + height  ≤ source height
```

Use **Get Image Dimensions** before this action when crop coordinates are
calculated dynamically.

<Warning>
  The action fails when the requested rectangle extends beyond the image
  boundary. It does not pad or clamp the crop automatically.
</Warning>
