resize_canvas
Adjusts an image's canvas size without scaling its pixels, so you can add or trim surrounding space while anchoring existing content and filling new areas.
Instructions
Resize the image canvas without scaling the content.
Parameters:
width, height: New canvas dimensions in pixels
anchor: Position of existing content — "center" (default), "top-left", "top", "top-right", "left", "right", "bottom-left", "bottom", "bottom-right"
fill: Color for new canvas areas — CSS color or "transparent"
image_index: Target image index (default 0)
Returns: {status, width, height, offset_x, offset_y}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fill | No | transparent | |
| width | Yes | ||
| anchor | No | center | |
| height | Yes | ||
| image_index | No |