以下のバッチファイルを実行します。
rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.3-Q16
%im%\convert.exe sample5.jpg -threshold 53000 -negate -channel A -fx p.r==1?1:0 sample5.jpg -compose src_in -composite sample142a.png
%im%\convert.exe sample142a.png ( +clone -background #000000 -shadow 40x2+3+3 ) +swap -background white -mosaic sample142b.png
元画像(sample5.jpg)

出力画像(sample142b.png)

2008/01/04追記
ver6.3.7では、以下のバッチファイルのように-matteを追加します。
rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.7-Q16
%im%\convert.exe sample5.jpg -threshold 53000 -negate -matte -channel A -fx p.r==1?1:0 sample5.jpg -compose src_in -composite sample142a.png
%im%\convert.exe sample142a.png ( +clone -background #000000 -shadow 40x2+3+3 ) +swap -background white -mosaic sample142b.png
No comments:
Post a Comment