Thursday, May 10, 2007

ImageMagickでカーブがかかったグラデーションを描画する

ImageMagickでカーブがかかったグラデーションを描画するには、
以下のバッチを実行します。
rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.3-Q16
%im%\convert.exe -size 200x50 xc:white ( -size 200x50 gradient:#7799cc-#bbddff ) -append -wave 10x400 -gravity center -crop 200x50+0+0 +repage sample154a.png
出力画像(sample154a.png)

%im%\convert.exe -size 200x50 xc:white ( -size 200x50 gradient:#f4a729-#fce769 ) -append -wave -10x400 -gravity center -crop 200x50+0+0 +repage sample154b.png


出力画像(sample154b.png)

Saturday, May 05, 2007

ImageMagickで枠が立体的な凹み角丸四角のプレートを描画する

ImageMagickで枠が立体的な凹み角丸四角のプレートを描画するには、
以下のバッチファイルを実行します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.3-Q16
%im%\convert.exe -size 200x50 xc:none -stroke #f8c749 -fill none -draw "stroke-width 3 path 'M 10,1 A 10,10 0 0,1 1,10 L 1,39 A 10,10 0 0,1 9,48 L 189,48 A 10,10 0 0,1 198,39 L 198,10 A 10,10 0 0,1 189,1 Z" sample153a.png
%im%\convert.exe sample153a.png -background none -gravity center -extent 202x52 -threshold 1 -shade 135x20 -blur 0x1 -normalize sample153a.png -compose overlay -composite -gravity center -crop 200x50+0+0 +repage sample153b.png
%im%\convert.exe -size 200x50 xc:none -stroke #f8c749 -tile gradient:#fce769-#ffffee -draw "stroke-width 3 path 'M 10,1 A 10,10 0 0,1 1,10 L 1,39 A 10,10 0 0,1 9,48 L 189,48 A 10,10 0 0,1 198,39 L 198,10 A 10,10 0 0,1 189,1 Z" sample153b.png -composite sample153c.png

出力画像(sample153c.png)

ImageMagickで凹み角丸四角を描画する

ImageMagickで凹み角丸四角を描画するには、
以下のバッチファイルを実行します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.3-Q16
%im%\convert.exe -size 200x50 xc:none -stroke #f8c749 -fill #ffffee -draw "path 'M 10,0 A 10,10 0 0,1 0,10 L 0,39 A 10,10 0 0,1 9,49 L 189,49 A 10,10 0 0,1 199,39 L 199,10 A 10,10 0 0,1 189,0 Z" sample152a.png

出力画像(sample152a.png)

Thursday, May 03, 2007

ImageMagickで2色ストライプの円を描画する

ImageMagickで2色ストライプの円を描画するには、
以下のバッチファイルを実行します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.3-Q16
%im%\convert.exe -size 400x200 xc:none -tile gradient:#ffffff-#bbddff -draw "path 'M 200,200 L 200,0 A 200,200 0 0,1 252,6 Z" -tile gradient:#ffffff-#ffeebb -draw "path 'M 200,200 L 147,6 A 200,200 0 0,1 200,0 Z" sample151a.png
%im%\convert.exe sample151a.png -background none -extent 400x400 -rotate 30 -gravity center -crop 400x400+0+0 +repage r1.png
%im%\convert.exe sample151a.png -background none -extent 400x400 -rotate 60 -gravity center -crop 400x400+0+0 +repage r2.png
%im%\convert.exe sample151a.png -background none -extent 400x400 -rotate 90 -gravity center -crop 400x400+0+0 +repage r3.png
%im%\convert.exe sample151a.png -background none -extent 400x400 -rotate 120 -gravity center -crop 400x400+0+0 +repage r4.png
%im%\convert.exe sample151a.png -background none -extent 400x400 -rotate 150 -gravity center -crop 400x400+0+0 +repage r5.png
%im%\convert.exe sample151a.png -background none -extent 400x400 -rotate 180 -gravity center -crop 400x400+0+0 +repage r6.png
%im%\convert.exe sample151a.png -background none -extent 400x400 -rotate 210 -gravity center -crop 400x400+0+0 +repage r7.png
%im%\convert.exe sample151a.png -background none -extent 400x400 -rotate 240 -gravity center -crop 400x400+0+0 +repage r8.png
%im%\convert.exe sample151a.png -background none -extent 400x400 -rotate 270 -gravity center -crop 400x400+0+0 +repage r9.png
%im%\convert.exe sample151a.png -background none -extent 400x400 -rotate 300 -gravity center -crop 400x400+0+0 +repage r10.png
%im%\convert.exe sample151a.png -background none -extent 400x400 -rotate 330 -gravity center -crop 400x400+0+0 +repage r11.png
%im%\convert.exe sample151a.png r1.png r2.png r3.png r4.png r5.png r6.png r7.png r8.png r9.png r10.png r11.png -mosaic -resize 200x200 sample151b.png

出力画像(sample151b.png)

Wednesday, May 02, 2007

ImageMagickで半透明矩形に透過文字を描画して影付けする

ImageMagickで半透明矩形に透過文字を描画して影付けするには、
以下のバッチファイルを実行します。

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

Sunday, April 29, 2007

ImageMagickで画像に影付けしてモーションブラーをかける

ImageMagickで画像(透過PNG)に影付けしてモーションブラーをかけるには、
以下のバッチファイルを実行します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.3-Q16
%im%\convert.exe -size 150x150 xc:white ( sample2.png -background none -gravity center -extent 150x150 ) ( +clone -background #000000 -shadow 40x2+3+3 -motion-blur 0x20+225 ) +swap -mosaic sample148a.jpg

元画像(sample2.png)


出力画像(sample148a.jpg)


関連項目
ImageMagickとPHPで透過PNGに影付けして、影にモーションブラーをかける
ImageMagickとPHPで、文字列にモーションブラーをかける

Tuesday, April 24, 2007

ImageMagickで画像の2値化切り取りと重ねあわせ処理する

ImageMagickで画像の2値化切り取りと重ねあわせ処理するには、
以下のバッチファイルを実行します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.3-Q16
%im%\convert.exe sample5b.jpg -threshold 53000 -negate -channel A -fx p.r==1?1:0 sample147a.png
%im%\convert.exe sample147a.png -fx "p==1?#909F90:0" bg1.png
%im%\convert.exe sample147a.png -fx "p==1?#B0BFB0:0" bg2.png
%im%\convert.exe sample147a.png -fx "p==1?#D0DFD0:0" bg3.png
%im%\convert.exe sample147a.png -fx "p==1?#F0FFF0:0" bg4.png
%im%\convert.exe sample147a.png sample5b.jpg -compose src_in -composite sample147b.png
%im%\convert.exe -size 100x100 xc:white bg4.png -composite bg3.png -geometry -20+24 -composite bg2.png -geometry -10+16 -composite bg1.png -geometry +0+8 -composite sample147b.png -geometry +10+0 -composite sample147.jpg

元画像(sample5b.jpg)


出力画像(sample147.jpg)

Sunday, April 22, 2007

ImageMagickで画像に立体的な枠をつける

ImageMagickで画像に立体的な枠をつけるには、
以下のバッチファイルを実行します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.3-Q16
%im%\convert.exe -size 100x100 xc:none -channel RGBA -fill white -draw "roundrectangle 5,5 94,94 10,10" sample8.jpg -compose src_in -composite sample141a.png
%im%\convert.exe -size 100x100 xc:none -fill none -stroke white -strokewidth 6 -draw "roundrectangle 5,5 94,94 10,10" -shade 135x25 -blur 0x1 -normalize sample141a.png -compose overlay -composite sample141b.png

元画像(sample8.jpg)


出力画像(sample141b.jpg)

Saturday, April 21, 2007

ImageMagickで任意の2色の上下グラデーションの角丸四角を描画する

ImageMagickで任意の2色の上下グラデーションの角丸四角を描画するには、
以下のバッチファイルを実行します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.3-Q16
%im%\convert.exe -size 150x150 xc:none -fill white -draw "roundrectangle 0,0 149,149 15,15" ( xc:#e0ff80 xc:#80ffff +append -resize 2x1 ) -fx "s.p==0?0:v.p{(1-sin(pi*j/h)),1}" -matte sample150a.gif

出力画像(sample150a.gif)

関連項目

ImageMagickで彩度が変化するGIFアニメーションを作成する

ImageMagickで彩度が変化するGIFアニメーションを作成するには、
以下のバッチファイルを実行します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.3-Q16
rem 彩度を変更(明るさはそのまま)
%im%\convert.exe sample4.jpg -modulate 100,100 f1.png
%im%\convert.exe sample4.jpg -modulate 100,90 f2.png
%im%\convert.exe sample4.jpg -modulate 100,80 f3.png
%im%\convert.exe sample4.jpg -modulate 100,70 f4.png
%im%\convert.exe sample4.jpg -modulate 100,60 f5.png
%im%\convert.exe sample4.jpg -modulate 100,50 f6.png
%im%\convert.exe sample4.jpg -modulate 100,40 f7.png
%im%\convert.exe sample4.jpg -modulate 100,30 f8.png
%im%\convert.exe sample4.jpg -modulate 100,20 f9.png
%im%\convert.exe sample4.jpg -modulate 100,10 f10.png
%im%\convert.exe sample4.jpg -modulate 100,0 f11.png

%im%\convert.exe f1.png f2.png f3.png f4.png f5.png f6.png f7.png f8.png f9.png f10.png f11.png -set delay 20 -loop 0 sample146.gif

元画像(sample4.jpg)


出力画像(sample146.gif)

Friday, April 20, 2007

ImageMagickで画像を銭湯タイル風に変換する

ImageMagickで画像を銭湯タイル風に変換するには、
以下のバッチファイルを実行します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.3-Q16
rem モザイク画像の生成と縦線描画
%im%\convert.exe -size 100x100 xc:none -channel RGBA ( sample4.jpg -resize 10x10 ) -fx "i%%10<9?v.p{ceil((i+1)/10)-1,ceil((j+1)/10)-1}:0" sample143a.png
rem 横格子線のついたモザイク画像の生成
%im%\convert.exe sample143a.png -channel RGBA -fx "j%%10<9?p:0" sample143b.png
rem 立体化してタイル風に。
%im%\convert.exe sample143b.png -threshold 1 -shade 135x20 -blur 0x1 -normalize sample143b.png -compose overlay -composite sample143c.png

元画像(sample4.jpg)


出力画像(sample143b.png)


出力画像(sample143c.png)


Thursday, April 19, 2007

ImageMagickでクレヨン風の文字列を描画する

ImageMagickでクレヨン風の文字列を描画するには、
以下のバッチファイルを実行します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.3-Q16
%im%\convert.exe -size 120x40 xc:white -stroke #fad759 -fill #f6b739 -font Tahoma -draw "font-size 30 text 2,30 'Sample'" -spread 1 sample145a.jpg

sample145a.jpg

Tuesday, April 17, 2007

ImageMagickで閾値を使用して切り取った画像に影付けする

ImageMagickで閾値を使用して切り取った画像に影付けするには、
以下のバッチファイルを実行します。

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

Monday, April 16, 2007

ImageMagickで画像をトリムする

ImageMagickを-trimと-fuzzオプションを使用して
以下のように画像をトリムすることができます。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.3-Q16
%im%\convert.exe sample11.jpg -fuzz 8%% -trim sample137a.jpg
%im%\convert.exe sample11.jpg -fuzz 15%% -trim sample137b.jpg

元画像(sample11.jpg)


出力画像(sample137a.jpg) -fuzz=8%


出力画像(sample137b.jpg) -fuzz=15%

Sunday, April 15, 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)+
rem 単色
%im%\convert.exe -size 100x100 xc:none -fill #BBDDFF -draw "path 'M 0,10 A 10,10 0 0,1 10,0 L 99,0 L99,90 A 10,10 0 0,1 90,99 L 0,99 Z" sample140a.png

出力画像(sample140a.png)


rem グラデーション
%im%\convert.exe -size 100x100 xc:none -tile gradient:#BBDDFF-#E0F0FF -draw "path 'M 0,10 A 10,10 0 0,1 10,0 L 99,0 L99,90 A 10,10 0 0,1 90,99 L 0,99 Z" sample140b.png

出力画像(sample140b.png)


rem 切り取り
%im%\convert.exe -size 100x100 xc:none -channel RGBA -fill #ffffffff -draw "path 'M 0,10 A 10,10 0 0,1 10,0 L 99,0 L99,90 A 10,10 0 0,1 90,99 L 0,99 Z" sample2bg.jpg -compose src_in -composite sample140c.png

元画像(sample2bg.jpg)


出力画像(sample140c.png)

Wednesday, April 11, 2007

ImageMagickで画像を立体的な角丸四角に加工する

ImageMagickで画像を立体的な角丸四角に加工するには、
以下のバッチファイルを実行します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.3-Q16
rem 角丸四角で切り抜いて
%im%\convert.exe -size 100x100 xc:none -channel RGBA -fill white -draw "roundrectangle 5,5 94,94 10,10" sample2bg.jpg -compose src_in -composite sample139a.png
rem 立体化
%im%\convert.exe -size 100x100 xc:none -fill white -draw "roundrectangle 5,5 94,94 10,10" -shade 135x23 -blur 0x2 -normalize sample139a.png -compose overlay -composite sample139b.png

元画像(sample2bg.jpg)


出力画像(sample139b.png)

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)

Sunday, April 08, 2007

ImageMagickで円形に広がるアニメーションGIFを作成する

ImageMagickで円形に広がるアニメーションGIFを作成するには、
以下のバッチファイルを実行します。

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

%im%\convert.exe -size 100x100 sample4.jpg ( xc:none -channel RGBA -fill #ffffffff -background none -draw "circle 60,60 50,50" -negate ) -background #ffffdd -compose screen -composite f1.png
%im%\convert.exe -size 100x100 sample4.jpg ( xc:none -channel RGBA -fill #ffffffff -background none -draw "circle 60,60 45,44" -negate ) -background #ffffdd -compose screen -composite f2.png
%im%\convert.exe -size 100x100 sample4.jpg ( xc:none -channel RGBA -fill #ffffffff -background none -draw "circle 60,60 40,40" -negate ) -background #ffffdd -compose screen -composite f3.png
%im%\convert.exe -size 100x100 sample4.jpg ( xc:none -channel RGBA -fill #ffffffff -background none -draw "circle 60,60 35,35" -negate ) -background #ffffdd -compose screen -composite f4.png
%im%\convert.exe -size 100x100 sample4.jpg ( xc:none -channel RGBA -fill #ffffffff -background none -draw "circle 60,60 30,30" -negate ) -background #ffffdd -compose screen -composite f5.png
%im%\convert.exe -size 100x100 sample4.jpg ( xc:none -channel RGBA -fill #ffffffff -background none -draw "circle 60,60 25,25" -negate ) -background #ffffdd -compose screen -composite f6.png
%im%\convert.exe -size 100x100 sample4.jpg ( xc:none -channel RGBA -fill #ffffffff -background none -draw "circle 60,60 20,20" -negate ) -background #ffffdd -compose screen -composite f7.png
%im%\convert.exe -size 100x100 sample4.jpg ( xc:none -channel RGBA -fill #ffffffff -background none -draw "circle 60,60 15,15" -negate ) -background #ffffdd -compose screen -composite f8.png
%im%\convert.exe -size 100x100 sample4.jpg ( xc:none -channel RGBA -fill #ffffffff -background none -draw "circle 60,60 10,10" -negate ) -background #ffffdd -compose screen -composite f9.png
%im%\convert.exe f1.png f2.png f3.png f4.png f5.png f6.png f7.png f8.png f9.png sample4.jpg -set delay 20 -loop 0 sample62.gif

元画像(sample4.jpg)


出力画像(sample62.gif)

Friday, April 06, 2007

ImageMagickとVBで画像の幅・高さを取得する

ImageMagickとVBで画像の幅・高さを取得するには、
以下のスクリプトを実行します。

Set im = CreateObject("ImageMagickObject.MagickImage.1")
width = im.identify("-format", "%w", "sample7.jpg")
WScript.StdOut.WriteLine "width:" & width
height = im.identify("-format", "%h", "sample7.jpg")
WScript.StdOut.WriteLine "height:" & height
Set im = Nothing

入力画像(sample7.jpg)

実行結果:
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
width:150

Thursday, April 05, 2007

ImageMagickで任意の範囲の色相の色を残す

ImageMagickで任意の範囲の色相の色を残して、他は白黒化するには
以下のバッチファイルを実行します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.3-Q16%im%\convert.exe sample8.jpg -fx "(hue>0.19&&hue<0.47)?p:(r+g+b)/3" sample135a.jpg

元画像(sample8.jpg)


出力画像では緑っぽい色が残り、その他は白黒になります。
出力画像(sample135a.jpg)


関連項目
ImageMagickで、青っぽい所以外を白黒にする
RMagickで緑っぽいところ以外をグレースケールにする (RMagickでの同様の処理)

Tuesday, April 03, 2007

ImageMagickで斜線グラデーションの背景画像を生成する

ImageMagickで斜線グラデーションの背景画像を生成するには、
以下のバッチファイルを実行します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.1-Q16
%im%\convert.exe -size 300x20 xc:black -fx "(i+j)%%5==0?0:(sin(pi*i/w))*0.6" sample122a.jpg

出力画像(sample122a.jpg)


以下のように色をつけることもできます。
%im%\convert.exe -size 300x20 xc:black -fx "(i+j)%%5==0?0:(sin(pi*i/w))*0.6" -fill #ccddff -colorize 50% sample122b.jpg


出力画像(sample122b.jpg)


ImageMagickで半透明プレートを重ねたようなラベルを描画する

ImageMagickで半透明プレートを重ねたようなラベルを描画するには、
以下のバッチファイルを実行します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.1-Q16
%im%\convert.exe -size 100x20 xc:white -fill #bbddff -stroke #ffffff -draw "opacity 0.5 roundrectangle 0,0 99,19 8,8" -background white -rotate 5 -fill #bbddff -stroke #ffffff -draw "opacity 0.5 roundrectangle 0,0 99,19 8,8" -background white -rotate 5 -draw "opacity 0.5 roundrectangle 0,0 99,19 8,8 fill #1060c0 text 20,15 'Information' " -rotate -4 sample121.png

出力画像(sample121.png)

Sunday, April 01, 2007

ImageMagickで段差のある領域に切り抜く

ImageMagickで段差のある領域に切り抜くには、以下のバッチを
実行します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.1-Q16
rem マスクを作って
%im%\convert.exe -size 200x100 xc:none -channel RGBA ( -size 200x100 xc:black -fill white -draw "roundrectangle -10,-10 100,99 10,10 rectangle 100,0 199,99" -fill black -draw "roundrectangle 100,40 210,110 10,10" ) -fx "v.p.r==1?1:0" mask.png
rem 切り抜き
%im%\convert.exe mask.png sample8.jpg -compose src_in -composite sample120a.png

元画像(sample8.jpg)



出力画像(sample120a.png)

ImageMagickで画像に半透明ガラス枠をつける

ImageMagickで画像に半透明ガラス枠をつけるには、
以下のバッチファイルを実行します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.1-Q16
%im%\convert.exe sample8.jpg -resize 220x120! -modulate 80 -bordercolor #000000 -border 10x10 -fill #ffffff -draw "rectangle 20,20 219,109" -blur 0x1 -gravity northwest -chop 10x10 -gravity southeast -chop 10x10 -gravity northwest sample8.jpg -geometry +10+10 -composite sample119a.jpg

元画像(sample8.jpg)


出力画像(sample119a.jpg)

Friday, March 30, 2007

ImageMagickで左上が明るいボタンを作成する

ImageMagickで左上が明るいボタンを作成するには、
以下のバッチファイルを実行します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.1-Q16
rem ボタン画像1
%im%\convert.exe -size 100x20 xc:none -fill #fad759 -stroke #ffffff -draw "roundrectangle 0,0 99,19 8,8" ( -size 100x20 xc:#f8f8ffff -channel A -fx "((w-i)/w)*((h-j)/h)*0.6+0.3" ) -composite -stroke none -fill #a0a0a0 -draw "font-size 12 text 32,15 'Search'" ( +clone -background #000000 -shadow 40x2+3+3 ) +swap -background white -mosaic sample117a.gif
rem ボタン画像2
%im%\convert.exe -size 100x20 xc:none -fill #c0c0c0 -stroke #ffffff -draw "roundrectangle 0,0 99,19 8,8" ( -size 100x20 xc:#f8f8ffff -channel A -fx "((w-i)/w)*((h-j)/h)*0.6+0.3" ) -composite -stroke none -fill #707070 -draw "font-size 12 text 32,15 'Search'" ( +clone -background #000000 -shadow 40x2+3+3 ) +swap -background white -mosaic sample117b.gif
rem 2つのボタン画像を連結
%im%\convert.exe sample117a.gif sample117b.gif +append button.gif

出力画像(button.gif)

ImageMagickで鏡面映り込みを作成する - その3

ImageMagickで映りこんだ部分に斜線がはいった
鏡面映り込み画像を作成するには以下のバッチを実行します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.1-Q16
rem 反転&半透明グラデーションをかけて
%im%\convert.exe sample4.jpg -bordercolor #c0c0c0 -border 1x1 -channel A -fx "u!=0?(j/h)*0.6:0" -fx "(i+j)%%5==0?0:p" -flip sample4t.png
rem 縦に連結+傾け
%im%\convert.exe sample4.jpg -bordercolor #c0c0c0 -border 1x1 sample4t.png -append -background none -shear 0x5 -gravity center -extent 220x220 sample115a.png
rem jpgで出力
%im%\convert.exe -size 220x220 xc:black sample115a.png -composite sample115b.jpg

元画像(sample4.jpg)


出力画像(sample115b.jpg)

ImageMagickで、重ねあわせ画像の形に合わせてグラデーションを描画する

重ねあわせ画像の形に合わせて、
2色のグラデーションを描画するには以下のバッチを実行します。
(以下の例では黄色と緑のグラデーションになっています)

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.1-Q16
%im%\convert.exe -size 150x150 xc:#20c332 ( -size 150x150 xc:none -channel RGBA sample2.png -geometry +10+10 +composite -fx "p!=0?#FFFF10:0" -blur 0x15 ) -composite sample2.png -geometry +10+10 -composite sample113a.jpg

元画像(sample2.png)


出力画像(sample113a.jpg)


2008/01/04追記
Ver6.3.7では、以下のバッチファイルを実行します。
rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.7-Q16
%im%\convert.exe -size 150x150 xc:#20c332 ( -size 150x150 xc:none -matte -channel RGBA sample2.png -geometry +10+10 +composite -fx "p!=0?#FFFF10FF:0" -blur 0x15 ) -composite sample2.png -geometry +10+10 -composite sample113a.jpg