Crop
photopea_cropCrop the active document to a specified pixel rectangle, discarding all content outside the bounds. Use it to remove unwanted edges or focus on a precise image region.
Instructions
Crop the active document to a rectangle in pixels. Content outside the rectangle is discarded. Use get_document_info for the current size; use resize_canvas to add space instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | Left edge of the crop rectangle in pixels | |
| y | Yes | Top edge of the crop rectangle in pixels | |
| width | Yes | Width of the crop rectangle in pixels | |
| height | Yes | Height of the crop rectangle in pixels |