rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.5-Q16
%im%\convert.exe -size 200x200 xc:white -channel rgb -fx "floor((atan2(50-i,170-j)+2*pi)/(pi/24))%%2==0?#F8C749:#FCE769" -channel a -fx "0.5-sqrt((50-i)^2+(170-j)^2)/200" -channel rgba sample218a.png
rem 重ねあわせ例
%im%\convert.exe sf.jpg sample218a.png -composite samples218b.jpg
出力画像(sample218a.png)

重ねあわせ例(sample218b.jpg)

2008/01/04追記
ver6.3.7では、以下のように-matteを追加します。
rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.7-Q16
%im%\convert.exe -size 200x200 xc:white -channel rgb -fx "floor((atan2(50-i,170-j)+2*pi)/(pi/24))%%2==0?#F8C749:#FCE769" -matte -channel a -fx "0.5-sqrt((50-i)^2+(170-j)^2)/200" -channel rgba sample218a.png
rem 重ねあわせ例
%im%\convert.exe sf.jpg sample218a.png -composite samples218b.jpg
No comments:
Post a Comment