自动在图像上添加文字

Automatically add text over image

必须在图像上添加不同的文本。文本在 table 中。大约有10,000个。我怎样才能使这个过程自动化?也许是 Photoshop 的脚本?或者是其他东西? 提前致谢!

在设计中,数据合并适用于文本和图像。 https://www.youtube.com/watch?v=ktcbTtC3-Xk

photoshop中有可变功能查看教程 https://www.youtube.com/watch?v=3IzpItHTvyo

我会推荐 ImageMagick。它最简单地安装在 macOS 上 homebrew,只需:

brew install imagemagick

那么如果你的 table 在 table.csv

中看起来像这样
base1.png,180,100,result1.png,I have a dream
base2.png,20,90,result2.png,Four score and seven years ago
base3.png,50,180,result3.png,Gonna build me a wall

您可以在 bash 终端中执行以下操作:

#!/bin/bash
while IFS=, read base x y result text; do
   echo DEBUG: $base $x $y $result $text
   convert "$base" -pointsize 18 -annotate +${x}+${y} "$text" "$result"
done < table.csv

你会得到这个: