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 ./output

Parameter Reference

ParameterRequiredDescription
--image_urlYesAliases: --image
--source_wordsNoType: string
--target_wordsNoType: string
--promptNoType: string
--download-dirNoType: string
--outputNoType: string[]
--jsonNoOutput results in JSON format for easy script or agent parsing