我需要动态创建一个图像,并且我试图从命令行使用magick
或convert
找到一个好的“起始位置”(实际的库我会将CLI命令转换为是用于红宝石的MiniMagick)
老实说,这有点压倒性......我不是要求别人为我写整篇文章,只是给我一个很好的'起点',然后我可以继续添加文字“层”到
这是最终输出图像需要的样子,以及我正在寻找的所需内容:
答案 0 :(得分:2)
这将让您开始使用ImageMagick来创建图像。 Unix语法。 ImageMagick没有下划线功能。因此,您需要为该部分选择下划线字体。 (但是,有一些稍微复杂的方法来实现使用标签:然后拼接下划线)
convert -size 299x249 xc:white \( circle.png -resize 200x200 \) \
-gravity northwest -geometry +100+70 -compose over -composite \
-bordercolor red -border 1 \
-font arial -fill red -pointsize 18 -gravity north -annotate +0+20 "**Info**" \
-font arial -fill blue -pointsize 28 -gravity south -annotate +0+50 "click here" \
\( -size 279x -background none -fill black \
-font arial -pointsize 28 -gravity center \
caption:"Welcome John to your profile, have a look around" -trim +repage \) \
-gravity center -geometry +0-20 -compose over -composite \
result.png
注意:稍微更新