Monday, August 06, 2007

ImageMagickで飛び出した感じの文字列を描画する

ImageMagickで飛び出した感じの文字列を描画するには、
以下のバッチファイルを実行します。

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

%im%\convert.exe -size 200x50 xc:none -channel RGBA -font Tahoma -gravity center -fill #F0F0FF -stroke #90A0FF -strokewidth 1 -draw "font-size 31 text 0,0 'ImageMagick'" t1.png
%im%\convert.exe -size 200x50 xc:none -channel RGBA +antialias -font Tahoma -gravity center -fill white -stroke white -strokewidth 2 -draw "font-size 30 text 0,2 'ImageMagick'" ( -size 1x1 xc:#20c332 xc:#FFFF10 +append -resize 2x1 ) -fx "p.r==0?0:v.p{0,0}" t2.png
%im%\convert.exe -size 200x50 xc:none -channel RGBA +antialias -font Tahoma -gravity center -fill white -stroke white -strokewidth 2 -draw "font-size 29 text 0,4 'ImageMagick'" ( -size 1x1 xc:#20c332 xc:#FFFF10 +append -resize 2x1 ) -fx "p.r==0?0:v.p{0.25,0}" t3.png
%im%\convert.exe -size 200x50 xc:none -channel RGBA +antialias -font Tahoma -gravity center -fill white -stroke white -strokewidth 2 -draw "font-size 28 text 0,6 'ImageMagick'" ( -size 1x1 xc:#20c332 xc:#FFFF10 +append -resize 2x1 ) -fx "p.r==0?0:v.p{0.50,0}" t4.png
%im%\convert.exe -size 200x50 xc:none -channel RGBA +antialias -font Tahoma -gravity center -fill white -stroke white -strokewidth 2 -draw "font-size 27 text 0,8 'ImageMagick'" ( -size 1x1 xc:#20c332 xc:#FFFF10 +append -resize 2x1 ) -fx "p.r==0?0:v.p{0.75,0}" t5.png
%im%\convert.exe -size 200x50 xc:none -channel RGBA +antialias -font Tahoma -gravity center -fill white -stroke white -strokewidth 2 -draw "font-size 26 text 0,10 'ImageMagick'" ( -size 1x1 xc:#20c332 xc:#FFFF10 +append -resize 2x1 ) -fx "p.r==0?0:v.p{1,0}" t6.png
%im%\convert.exe t6.png t5.png -composite t4.png -composite t3.png -composite t2.png -composite t1.png -composite sample185a.png

出力画像(sample185a.png)

No comments: