如何使用imagemagick对照片应用40%混合效果?
对于使用翻译器时英语的尴尬,我深表歉意。
我想将照片 2 应用于照片 1,并具有 40% 的叠加效果。 我成功地覆盖了它,但它是100%的。 有没有办法应用 40% 的混合效果?
下面是我使用的代码。
magick Convert -composite -compose overlay 1.png 2.png out.png
这里是一个 psd 示例文件。
https://drive.google.com/file/d/1hE8LHCO5pWOiWvguce463ZVMw9LdV0pv/查看?usp=共享
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
好的。我能够访问您的 PSD 文件并将其导出为 PNG,并且可以看到它在透明度值设置和混合模式方面使用的过程。
我把基础镜像分离出来了,如下。
下面是 Imagemagick 7 中的 3 个变体,它们与 Photoshop 所创建的内容很接近:
OK. I was able to access your PSD file and exported it as a PNG and can see what process it uses in terms of the transparency values set and blending mode.
I separated out the base image, which is as follows.
So here are 3 variations in Imagemagick 7 that are close to what Photoshop is creating:
您可以像这样指定百分比混合:
避免
magick Convert ...
它会导致较旧的 v6 行为,这是很少需要的。另外,尝试在应用运算符之前指定输入图像。You can specify percentage mix like this:
Avoid
magick convert ...
it leads to older, v6 behaviour which is rarely desirable. Also, try to specify input images before operators applied to them.马克是正确的。使用-compose 混合。您将在 Imagemagick 7 上执行以下操作
如果使用 Imagemagick 6,则将
magick
更改为convert
。Mark is correct. Use -compose blend. You would do the following on Imagemagick 7
If using Imagemagick 6, then change
magick
toconvert
.使用 ImageMagick 将颜色应用于图像的方法有很多种。如果某些特定方法没有给出您想要的结果,也许可以探索一些其他选项。以下是一些示例命令以及我们可能得到的结果类型...
输入图像...
使用“叠加”方法的简单合成...
一个40/60 复合与“混合”方法...
使用“colorize”方法应用颜色...
使用“乘法”合成方法进行合成...
使用
-tint
为图像添加颜色...There are many ways to apply color to an image using ImageMagick. If some particular method isn't giving the results you're looking for, maybe explore some other options. Here are some example commands and the kinds of results we might get...
The input images...
A simple composite with the "overlay" method...
A 40/60 composite with the "blend" method...
Using the "colorize" method to apply the color...
Composite with the "multiply" compose method...
Add color to the image using
-tint
...