Monday, February 02, 2009

ImageMagickでバンド状の半透明グラデーション円で画像を切り取る

ImageMagickでバンド状の半透明グラデーション円で画像を切り取るには、以下のバッチファイルを実行します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.4.4-Q16

%im%\convert.exe -size 200x200 xc:none -matte -channel rgba -fill #80808080 -draw "ellipse 100,100,70,70,0,360" -draw "ellipse 100,100,80,80,0,360" -draw "ellipse 100,100,90,90,0,360" -draw "ellipse 100,100,100,100,0,360" sf.jpg -compose src_in -composite sample763a.png

%im%\convert.exe sf2.jpg sample763a.png -composite sample763b.png


元画像(sf.jpg)


出力画像1(sample763a.png)


出力画像2(sample763b.png):ほかの画像と重ねあわせ例


関連項目
ImageMagickで、端が半透明の円形に画像を切り取る
ImageMagickで、波型の円で端をぼかして切り取る

No comments: