Resize Canvas
photopea_resize_canvasResizes the canvas without scaling image content: larger sizes add empty or colored space, smaller sizes crop edges, and the anchor determines which side stays fixed.
Instructions
Change the canvas size without scaling the content: larger adds empty space, smaller cuts off edges. The anchor decides which side stays fixed. Use resize_document to scale the content instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | Yes | New canvas width in pixels | |
| anchor | No | Where the existing content stays, e.g. 'center' adds space equally on all sides, 'top-left' adds it to the right and bottom | center |
| height | Yes | New canvas height in pixels | |
| fillColor | No | Color for the added area, e.g. #ffffff for a white border. Adds a solid 'Canvas Fill' layer at the bottom. Omit for transparent. |