Batch Image Transform
Batch geometric transformations (rotate, flip, scale up/down, canvas expand) without altering image content.
meitu batch image-transform
Note: Batch processing is available from meitu-cli v2.1.1 onward. Please upgrade if you're on an older version.
Usage Examples
# Scenario 1: Directory scan mode
meitu batch image-transform \
--input-dir ./images \
--output-dir ./transformed \
--rotate 90 \
--json
# Scenario 2: Config file mode
meitu batch image-transform \
--config ./batch.image-transform.yaml \
--output-dir ./transformed \
--jsonConfig File Example
version: 1
defaults:
outputDir: ./transformed
items:
- input: ./images/img1.jpg
rotate: 90
flipX: true
- input: ./images/img2.jpg
srNum: 2
prompt: scale up by 2xParameter Reference
| Parameter | Required | Description |
|---|---|---|
--input-dir | No | Input directory, recursively scans image files |
--output-dir | Yes | Output directory |
--config | No | Path to YAML/JSON config file |
--concurrency | No | Type: number; Default: 3; Number of parallel tasks |
--max-retries | No | Type: number; Default: 0; Number of retries on failure |
--skip-exist | No | Skip existing output files |
--dry-run | No | Preview the plan without execution |
--no-progress | No | Disable per-task progress logging |
--json | No | Output results in JSON format |
--json-output | No | Write results to a specified JSON file |
--skill-name | No | Skill name for server-side attribution |
--rotate | No | Type: number; Rotation angle (-180° to 180°) |
--flip-x | No | Type: boolean; Horizontal flip |
--flip-y | No | Type: boolean; Vertical flip |
--sr-num | No | Type: number; Scale factor (2/4/8) |
--target-width | No | Type: number; Target width |
--target-height | No | Type: number; Target height |
--width | No | Type: number; Width |
--height | No | Type: number; Height |
--prompt | No | Type: string; Transform description |