gpt4 book ai didi

imagemagick - 如何为绘制的文本添加背景颜色

转载 作者:行者123 更新时间:2023-12-04 14:00:57 24 4
gpt4 key购买 nike

使用 ImageMagick 6.8.1,我的目标是将文本添加到图像的左下角,并使该文本的背景为黑色。本质上,我希望图像左下角有一个 20x20 的黑色区域,并且该黑色区域有一些文本。除了黑色背景部分,我已经弄清楚了一切。

这是我到目前为止:convert in.tif -pointsize 10 -background "#000000" -fill white -gravity SouthWest -draw "text 0,0 'a'" out.tif)

最佳答案

试试这个,你在找什么底色而不是 背景 .底色仅填充文本覆盖的区域。

convert in.tif  -undercolor Black -pointsize 10 -fill white  -gravity SouthWest -annotate 0 'Text String' out.tif

关于imagemagick - 如何为绘制的文本添加背景颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21502189/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com