image-transform
Geometric image transforms (changing form without changing content). Covers rotation/flip (-180 to 180 degrees), proportional upscaling (2x, 4x, 8x), lossless proportional downscaling, and canvas extension/outpainting (AI smart fill; can expand a portrait image to landscape or vice versa; defaults to 3:4 when no ratio is specified).
meitu image-transform
Usage Examples
# Scenario 1: Rotate
meitu image-transform \
--image_url ./sample.jpg \
--rotate 90 \
--json
# Scenario 2: Proportional upscale
meitu image-transform \
--image_url ./sample.jpg \
--sr_num 2 \
--json
# Scenario 3: Canvas extension (outpainting)
meitu image-transform \
--image_url ./sample.jpg \
--width 1024 \
--height 768 \
--prompt "AI smart fill for the expanded area" \
--json
# Scenario 4: Horizontal flip + download results
meitu image-transform \
--image_url ./sample.jpg \
--flip_x true \
--json \
--download-dir ./outputParameter Reference
| Parameter | Required | Description |
|---|---|---|
--image_url | Yes | Aliases: --image |
--rotate | No | Type: number |
--flip_x | No | Type: boolean |
--flip_y | No | Type: boolean |
--sr_num | No | Type: number |
--target_width | No | Type: number |
--target_height | No | Type: number |
--width | No | Type: number |
--height | No | Type: number |
--prompt | No | Type: string |
--download-dir | No | Type: string |
--output | No | Type: string[] |
--json | No | Output results in JSON format for easy script or agent parsing |