以下のバッチファイルを実行します。
rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.3-Q16
%im%\convert.exe -size 100x50 xc:#00000080 -channel RGBA -fill #000000ff +antialias -gravity center -draw "font-size 18 text 0,0 'Flower'" -fx "p==#000000?0:p" sample149a.png
%im%\convert.exe sample7.jpg ( sample149a.png -background none -gravity center -extent 150x100 ) ( +clone -background #BBDDFF -shadow 150x3+3+3 ) +swap -mosaic sample149b.jpg
元画像(sample7.jpg)

出力画像(sample149b.jpg)

2008/01/04追記
ver6.3.7では、以下のバッチファイルを実行します。
rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.7-Q16
%im%\convert.exe -matte -channel RGBA -size 100x50 xc:#00000080 -fill #000000ff +antialias -gravity center -draw "font-size 18 text 0,0 'Flower'" -fx "p==#000000FF?0:p" sample149a.png
%im%\convert.exe sample7.jpg ( sample149a.png -background none -gravity center -extent 150x100 ) ( +clone -background #BBDDFF -shadow 150x3+3+3 ) +swap -mosaic -crop 150x100+0+0 sample149b.jpg
No comments:
Post a Comment