Imagemagick结合了几个命令

Imagemagick结合了几个命令

本文介绍了Imagemagick结合了几个命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有四张图片,a.png,b.png,c.png,d.png。
现在我想组成图像a,b和c并将它们着色后我想用d.png组合结果。我想用一个命令做到这一点:

I have four images, a.png, b.png, c.png, d.png.Now I would like to compose image a, b and c and colorize them after that I would like to compose the result with d.png. I want to do this with one command:

magick a.png b.png c.png -compose -channel R -evaluate multiply 0.9 - channel G -evaluate multiply 0.9 -channel B -evaluate multiply 0.9 d.png -compose result.png

但这对我不起作用要获得正确的输出,我必须通过两个步骤来完成:

But this does not work for me to get the right output I have to made this by two steps:

magick a.png b.png c.png -channel R -evaluate乘以0.9 -channel G -evaluate乘以0.9 -channel B -evaluate multiply 0.9 step.png

magick step.png d.png -compose result.png

有没有结合几个命令的解决方案?

Is there any solution to combine several commands?

推荐答案

不太确定你想要做什么,但希望以下想法会有所帮助.. 。

Not too sure what you are trying to do, but hopefully the following thoughts will help...

首先,你有

... -channel R -evaluate multiply 0.9 -channel G -evaluate multiply 0.9 -channel B -evaluate multiply 0.9

当你不妨使用时:

... channel RGB -evaluate multiply 0.9

其次,在选择要处理的特定频道后(使用 -channel ),您应该在最终 -composite +频道) $ C>。所以,我认为你可能会做得更好:

Secondly, after selecting a specific channel to work on (with -channel), you should then revert back to dealing with all channels (using +channel) before your final -composite. So, I think you may do better with this:

magick a.png b.png c.png -composite -channel RGB -evaluate multiply 0.9 +channel d.png -composite result.png

这篇关于Imagemagick结合了几个命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 22:21