这是在现有图片上绘制TRANSPARENT黄色框的代码.我在文档中添加了"Merry Xmas Mom and Dad"文本.挑战在于:如何在我刚刚创建的Box中自动调整我的'Merry Xmas Mom and Dad'?
如果我的文字改为"我爱你的妈妈和爸爸"怎么办?任何基于文本维度的"硬编码值"都必须重做.
转换funny-santa.jpg -strokewidth 0 -fill"rgba(255,215,0,0.5)"-draw"rectangle 0,0 1024,350"-pointsize 30 -fill black -annotate + 67 + 60' Merry Christmas Mom和爸爸'output.jpg