image-text-replace
Replaces existing text content in an image. Supports simple precise replacement (standard print fonts, single location, no more than 6 characters, same character count) and complex replacement (decorative fonts, handwriting, multiple locations, varying character count). When the target text contains Chinese characters, the original text is preserved without translation.
meitu image-text-replace
Usage Examples
# Scenario 1: Simple precise replacement (required parameters only)
meitu image-text-replace \
--image_url ./sample.jpg \
--source_words "old_text" \
--target_words "new_text" \
--json
# Scenario 2: Complex replacement (described via prompt)
meitu image-text-replace \
--image_url ./sample.jpg \
--prompt "Change the tagline to 'Limited Time Offer'" \
--json
# Scenario 3: Full parameters + download results
meitu image-text-replace \
--image_url ./sample.jpg \
--source_words "old_text" \
--target_words "new_text" \
--json \
--download-dir ./outputParameter Reference
| Parameter | Required | Description |
|---|---|---|
--image_url | Yes | Aliases: --image |
--source_words | No | Type: string |
--target_words | No | Type: string |
--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 |