Imagemagick组成图像倒置 [英] Imagemagick compose image inverted
问题描述
我想给图像加水印,所以我使用了组合乘法,但是由于某些原因,它不能按预期工作.
I want to watermark an image, so I used compose multiply, but for some reason it doesn't work as expected.
命令:
magick image.jpg over.png -compose multiply -resize 2048x2048 -gravity center -quality 65 -strip -composite out.jpg
over.png首先反转,然后应用? 如果对旧版本的Imagemagick(x32 6.7.6-1 2012-03-17 Q16)使用相同的命令,则会得到预期的结果. 这已在Windows 10下使用x64 ImageMagick 7.0.5 Q16进行了测试.
The over.png get inverted first and then applied?? If use the same command with and older version of Imagemagick (x32 6.7.6-1 2012-03-17 Q16) I get the expected results. This was tested with x64 ImageMagick 7.0.5 Q16 under Windows 10.
嗯,似乎无法发布所有图片.
Ah it seems I can't post all the images.
推荐答案
经过大量研究,结果证明这是一种图像伪像,是CMYK颜色空间中的JPEG. 很奇怪,但是你去了.
After a lot of research, turns out it's an artifact of one of the images being a JPEG in CMYK colorspace. Very weird, but there you go.
在该行中添加"-profile sRGB.icc"即可解决问题.
Adding '-profile sRGB.icc' to the line should take care of it.
这篇关于Imagemagick组成图像倒置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!