ImageMagick-将一张图像叠加到许多图像

发布于 2025-01-19 00:38:16 字数 243 浏览 2 评论 0原文

我有一个标有:test.png和img000.png-img480.png的图像文件夹,

如何单独覆盖test.png到每个imgxxx.png?

当前“ magick test.png img000.png- compose compose composite result.png”适用于单个.png,我不确定所有这些都可以/如果如何使用Mogrify。

任何帮助都非常感谢(非AmageMagick解决方案也很棒!)谢谢:)

I have a folder of images labelled: test.png and img000.png-img480.png

How can I overlay test.png onto every imgxxx.png individually?

Currently "magick test.png img000.png -compose over -composite result.png" works for a single .png, and I'm not sure how/if mogrify can be used for all of them.

Any help is greatly appreciated (non-imagemagick solutions would also be great!) thanks :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

稳稳的幸福 2025-01-26 00:38:16

在单独的目录中复制一些测试文件,然后切换到该目录并尝试以下操作:

magick mogrify -draw 'image Over 180,100 0,0 test.png' img*png

180,100 指定绘制位置,0,0 表示使用 test.png 的当前大小,即不调整大小。您可以更改混合模式(即此处的Over)以获得不同的效果。获取可用混合模式的列表:

magick identify -list compose

如果您希望将结果写入名为 RESULTS 的不同目录中,请使用:

mkdir -p RESULTS
magick mogrify -path RESULTS -draw 'image SrcOver 180,100 0,0 test.png' img*png

Make a copy of a few test files in a separate directory then change to that directory and try this:

magick mogrify -draw 'image Over 180,100 0,0 test.png' img*png

The 180,100 specifies where it will be drawn, and the 0,0 says to use the current size of test.png, i.e. no resizing. You can change the blend mode (i.e. Over here) for different effects. Get a list of available blend modes with:

magick identify -list compose

If you would like the results written in a different directory called RESULTS, use:

mkdir -p RESULTS
magick mogrify -path RESULTS -draw 'image SrcOver 180,100 0,0 test.png' img*png
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文