以下のバッチファイルを実行します。
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)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYqdfmZmTcZth5yzMDPAebsCdR30KH6QSi4_FQL41sYouPLJnEpKLXW3zIbVx7ucnm-o-sxUEeWRO3TYxRfw0_AUuyncRUpf4E_CSp_fts0tJuTX4xdOpoa2oJG6emeTEx1dwa/s320/sample7.jpg)
出力画像(sample149b.jpg)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicJPoMnqQIYruc0gTSv9r89Q8yQVM9pktkidRV3yRUn8EBN3-Ht8D-FRwUl24sKUASjZastgWjnAjeNOEY07sCw0Zjs1-Bk5CImt9n0fqDWlB-wwJopuT9yzyOTApYKL7kUhyW/s320/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