Showing posts with label 光沢. Show all posts
Showing posts with label 光沢. Show all posts

Friday, April 17, 2009

ImageMagickで光沢のある文字列のプレートを描画する

ImageMagickで光沢のある文字列のプレートを描画するには、以下のバッチファイルを実行します。

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

%im%\convert.exe -fill white -font Arial -pointsize 25 -background none "label:ImageMagick" -bordercolor black -border 10x5 ( +clone -channel rgb -fx "1" -matte -channel a -fx "j<h/2?0:(h-j)/h" ) -composite ( +clone -channel rgb -fx "1" -bordercolor white -border 1x1 -fx "(h-j)/h*p" -distort SRT -10 ) -swap 0,1 -gravity center -composite sample918a.png

%im%\convert.exe sample918a.png -bordercolor black -border 10x10 sample918b.png


出力画像1(sample918a.png)
imagemagickで生成した光沢のあるプレート

出力画像2(sample918b.png):黒背景の余白を追加

Friday, May 25, 2007

ImageMagickでカーブした光沢のある文字列を描画する

ImageMagickでカーブした光沢のある文字列を描画するには、
以下のバッチファイルを実行します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.4-Q16
%im%\convert.exe -size 300x80 xc:none -stroke #f8c749 -fill #f8c749 -gravity center -font Tahoma -draw "font-size 50 text 0,0 'ImageMagick'" -fx "(sin(i/w*pi)*h*0.2+h*0.4)>j?#FEF779:p" sample163a.png

出力画像(sample163a.png)



凸形状に光沢をつけるには、以下のコマンドを実行します。
%im%\convert.exe -size 300x80 xc:none -stroke #f8c749 -fill #f8c749 -gravity center -font Tahoma -draw "font-size 50 text 0,0 'ImageMagick'" -fx "(h*0.2-sin(i/w*pi)*h*0.2+h*0.5)>j?#FEF779:p" sample163b.png

出力画像(sample163b.jpg)


関連項目

Monday, April 09, 2007

ImageMagickで画像を光沢のある角丸四角にする

ImageMagickで画像を光沢のある角丸四角にするには、
以下のバッチファイルを実行します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.3-Q16
rem M moveto(x, y)
rem L lineto(x, y)
rem A elliptical arc(rx ry x-axis-rotation large-arc-flag sweep-flag x y)
%im%\convert.exe sample2bg.jpg ( -size 100x30 xc:none -tile gradient:#D0D0D070-#FFFFFFD0 -draw "path 'M 99,0 L 0,0 L0,30 A 99,19 0 0,1 99,10 Z" ) -composite sample138.jpg
%im%\convert.exe -size 100x100 xc:none -channel RGBA -fill white -draw "roundrectangle 0,0 99,99 10,10" sample138.jpg -compose src_in -composite sample138.png

元画像(sample2bg.jpg)


出力画像(sample138/png)

Tuesday, March 06, 2007

ImageMagickで光沢のある文字列を描画する

ImageMagickで光沢のある文字列を描画するには、
-fxオプションを使用して、画像の半分の高さの位置の
上下でグラデーションを適用します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.2-Q16
%im%\convert.exe -size 120x30 xc:none -fill #bbddff -font "Tahoma-Bold" -draw "font-size 30 text 5,23 'Sample'" -fx "(h/2>j)?(j/(h/2)*0.1+p):(p-((h-j)/(h/2)*0.1))" -background white sample132a.png

出力画像(sample132a.png)