実行します。
rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.8-Q16
rem 二値化して切り取った白黒画像を半透明にします
%im%\convert.exe -size 300x225 tree1.jpg -threshold 50%% -negate -matte -fill #00000000 -transparent #000000ff ( tree1.jpg -fx "luminosity" ) -compose src_in -composite -channel a -fx "p>0?0.2:0" sample337a.png
rem 元画像と半透明の画像を重ね合わせてゴースト効果をつけます
%im%\convert.exe tree1.jpg sample337a.png -geometry +7+0 -composite sample337b.png
元画像(tree1.jpg)

中間画像(sample337a.png)

出力画像(sample337b.png)

2008/07/13追記
ver6.4.0あたりからluminosityからlightnessに変わったので、以下のバッチを実行します。
rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.4.2-Q16
rem 二値化して切り取った白黒画像を半透明にします
%im%\convert.exe -size 300x225 tree1.jpg -threshold 50%% -negate -matte -fill #00000000 -transparent #000000ff ( tree1.jpg -fx "lightness" ) -compose src_in -composite -channel a -fx "p>0?0.2:0" sample337a.png
rem 元画像と半透明の画像を重ね合わせてゴースト効果をつけます
%im%\convert.exe tree1.jpg sample337a.png -geometry +7+0 -composite sample337b.png
No comments:
Post a Comment