2015-02-10 71 views
2

我找不到ImageMagick的命令,它對下面的圖像產生喜歡的效果(不要擔心,這些有趣的圖像只是例如:-))。 我嘗試了很多解決方案,但問題是,添加顏色後,漸變上的任何元素都會消失。 我無法找到解決方案,因爲在任何混合後,或着色源圖像上的所有陰影細節消失。ImageMagick將兩個圖像相乘(添加顏色)

下面的例子並不理想,我在GIMP中做了這個。但在ImageShack的結果更糟......(我不告訴他們:d)

enter image description here

enter image description here

回答

7

你不告訴你的目標是什麼,但它使用對我來說很好blend選項:

convert -size 200x187 xc:red red.png 
convert http://i.imgur.com/P2s0cKQ.png red.png -compose blend -composite out.png 

enter image description here

或者,你可以做到這一切一氣呵成,像此:

convert http://i.imgur.com/P2s0cKQ.png    \ 
    \(+clone -evaluate set 0 -channel R -negate \) \ 
    -compose blend -composite out.png 

此克隆中的原始圖像,然後將所有三個通道(RG & B)爲零,並且反轉的紅色通道將其設置爲全紅。

其他可能的混合模式可以使用

identify -list compose 

發現,他們看起來就像這樣:

enter image description here

+0

哇......我無法想象更好的答案。謝謝:-) – arrowman 2015-02-11 06:36:44

+0

我的榮幸。祝你好運! – 2015-02-11 11:11:12