【发布时间】:2017-07-12 21:14:40
【问题描述】:
我是 ImageMagick 的新手,我正在尝试将 3 个不同的标签添加到 3 个不同的(小)图像中,然后将它们插入到背景图像上,每个都在一个角落里。
所有图像和文本字符串都是事先未知的,这就是我编写脚本来处理它的原因。我最近(失败)的尝试是:
convert -page +0+0 ${bg}.png \
\( -page +0+0 -gravity south -pointsize 16 \
-stroke '#000C' -strokewidth 4 -annotate 0 "$label" \
-stroke none -strokewidth 20 -fill white -annotate 0 "$label" \) \
\( -page +0+0 ${im1}.png \
-stroke '#000C' -strokewidth 2 -annotate 0 "text1" \
-stroke none -fill white -annotate 0 "text1" \) \
\( -page +${hor_offset}+0 {im2}.png \
-gravity south -pointsize 14 \
-stroke '#000C' -strokewidth 2 -annotate 0 "text2" \
-stroke none -fill white -annotate 0 "text2" \) \
\( -page +0+${ver_offset} ${im3}.png \
-stroke '#000C' -strokewidth 2 -annotate 0 "text3" \
-stroke none -fill white -annotate 0 "text3" \) \
+page -flatten out.png
我之前有过更好的结果,但主要是偶然,决定寻求专家的帮助。
最终结果应该是这样的:Expected result
【问题讨论】:
标签: imagemagick imagemagick-convert