ImageMagick:附加时删除输入文件?

发布于 2025-01-20 00:02:35 字数 134 浏览 1 评论 0原文

当我尝试时

magick mogrify +append 1.jpg 2.jpg 3.jpg

,收到一条错误消息:“mogrify:无法打开 3.jpg”。有没有办法自动删除这两个输入文件?

When I try

magick mogrify +append 1.jpg 2.jpg 3.jpg

I get an error saying: "mogrify: unable to open 3.jpg". Is there a way to automatically delete the two input files?

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

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

发布评论

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

评论(1

长途伴 2025-01-27 00:02:35

只是为了清楚地将评论整理在一起...

您可以并排附加3张图像,如果命令这样成功,则删除输入映像:

magick 1.jpg 2.jpg 3.jpg +append result.jpg && rm [123].jpg

”


顺便说一句,在牙齿上很长,有一个更新的,更有用的操作员,称为+/- smush,其工作原理与+/-- append完全相同允许您使用+Smush版本创建差距,并与-Smush版本重叠:

magick 1.jpg 2.jpg 3.jpg -background black +smush 10 result.jpg && rm [123].jpg

Just collating the comments together for clarity...

You can append 3 images side-by-side, and remove the input images if the command succeeds like this:

magick 1.jpg 2.jpg 3.jpg +append result.jpg && rm [123].jpg

enter image description here


By the way, +append is quite long in the tooth and there is a more recent, more useful operator called +/-smush which works exactly the same as +/-append but allows you to create a gap with the +smush version and an overlap with the -smush version:

magick 1.jpg 2.jpg 3.jpg -background black +smush 10 result.jpg && rm [123].jpg

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文