Transform Image
transform_imageApply common image edits—crop, resize, rotate, flip, blur, sharpen, grayscale, or watermark—to prepare images for publishing, analysis, or delivery in PNG, JPEG, or WebP formats.
Instructions
Transform an image using Pillow operations.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| text | No | Watermark text | |
| width | No | ||
| factor | No | Sharpness factor (default: 2.0, >1 = sharper) | |
| height | No | ||
| radius | No | Blur radius (default: 2.0) | |
| degrees | No | Rotation angle in degrees | |
| opacity | No | Watermark opacity 0.0-1.0 (default: 0.5) | |
| position | No | Watermark position (default: 'bottom-right') | bottom-right |
| direction | No | Flip direction ('horizontal' or 'vertical') | |
| operation | Yes | One of: crop, resize, rotate, flip, blur, sharpen, grayscale, watermark | |
| image_path | Yes | Path to the image to transform | |
| output_format | No | Output format (png, jpeg, webp) | png |
| maintain_aspect | No | Keep aspect ratio when resizing (default: True) | |
| output_filename | No | Custom output filename (optional) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||