Friday, June 08, 2007

ImageMagickで画像を丸型に切り取って点線が回転するGIFアニメーションを作成する

ImageMagickで画像を丸型に切り取って点線が回転するGIFアニメーションを作成するには、
以下のバッチファイルを実行します。

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.4-Q16
%im%\convert.exe -size 100x100 xc:none -fill white -draw "circle 50,50 50,2" sample3b.jpg -compose srcin -composite -strokewidth 2 -fill none -stroke #c0b49d -draw "stroke-dasharray 4,4 stroke-dashoffset 7 circle 50,50 50,3" f1.png
%im%\convert.exe -size 100x100 xc:none -fill white -draw "circle 50,50 50,2" sample3b.jpg -compose srcin -composite -strokewidth 2 -fill none -stroke #c0b49d -draw "stroke-dasharray 4,4 stroke-dashoffset 6 circle 50,50 50,3" f2.png
%im%\convert.exe -size 100x100 xc:none -fill white -draw "circle 50,50 50,2" sample3b.jpg -compose srcin -composite -strokewidth 2 -fill none -stroke #c0b49d -draw "stroke-dasharray 4,4 stroke-dashoffset 5 circle 50,50 50,3" f3.png
%im%\convert.exe -size 100x100 xc:none -fill white -draw "circle 50,50 50,2" sample3b.jpg -compose srcin -composite -strokewidth 2 -fill none -stroke #c0b49d -draw "stroke-dasharray 4,4 stroke-dashoffset 4 circle 50,50 50,3" f4.png
%im%\convert.exe -size 100x100 xc:none -fill white -draw "circle 50,50 50,2" sample3b.jpg -compose srcin -composite -strokewidth 2 -fill none -stroke #c0b49d -draw "stroke-dasharray 4,4 stroke-dashoffset 3 circle 50,50 50,3" f5.png
%im%\convert.exe -size 100x100 xc:none -fill white -draw "circle 50,50 50,2" sample3b.jpg -compose srcin -composite -strokewidth 2 -fill none -stroke #c0b49d -draw "stroke-dasharray 4,4 stroke-dashoffset 2 circle 50,50 50,3" f6.png
%im%\convert.exe -size 100x100 xc:none -fill white -draw "circle 50,50 50,2" sample3b.jpg -compose srcin -composite -strokewidth 2 -fill none -stroke #c0b49d -draw "stroke-dasharray 4,4 stroke-dashoffset 1 circle 50,50 50,3" f7.png
%im%\convert.exe -size 100x100 xc:none -fill white -draw "circle 50,50 50,2" sample3b.jpg -compose srcin -composite -strokewidth 2 -fill none -stroke #c0b49d -draw "stroke-dasharray 4,4 stroke-dashoffset 0 circle 50,50 50,3" f8.png
%im%\convert.exe -set delay 10 f1.png f2.png f3.png f4.png f5.png f6.png f7.png f8.png -loop 0 sample166.gif

元画像(sample3b.jpg)


出力画像(sample166.gif)


No comments: