【问题标题】:How can I add transparent space around a gif?如何在 gif 周围添加透明空间?
【发布时间】:2017-06-27 14:31:29
【问题描述】:

我需要获取微调器 gif 并向其中添加文本,但文本需要位于微调器动画下方,低于当前图像的边框。

是否有使用 Imagemagick 在图像周围添加透明空间的命令?或者,是否有免费的在线工具可以达到同样的效果?

我尝试了以下方法,但它会创建一个非常紧张且无法使用的图像:

convert spinner.gif -background none -gravity north -extent 400x200 new_spinner.gif

【问题讨论】:

    标签: image imagemagick animated-gif


    【解决方案1】:

    感谢jimmetry's answer to this related questionthis imagemagick documentation 的组合,我找到了一个可行的解决方案:

    convert spinner.gif -coalesce -repage 0x0 -background none -gravity north -extent 400x200 +repage new_spinner.gif
    

    【讨论】:

    • 感谢您提供此命令。在互联网上搜索了很多,但没有一个网站让我添加左/右填充,但这个就像一个魅力。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-08-31
    • 1970-01-01
    • 2015-01-07
    • 2023-03-31
    • 2018-06-27
    • 2015-05-12
    • 2015-03-10
    相关资源
    最近更新 更多