三角形を描画後、-tileで複製してマスクを作成して
切り取ります。
rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.0-Q16
%im%\convert.exe -size 9x7 xc:none -matte -channel RGBA -fill #ffffffff -draw "polygon 0,0 4,6 8,0" down.png
%im%\convert.exe down.png -matte -channel RGBA -rotate -90 right.png
%im%\convert.exe -size 100x100 xc:none -matte -channel RGBA -tile down.png -draw "rectangle 0,0 100,6" -tile right.png -draw "rectangle 0,0 6,100" ( +clone -flip -flop ) -composite mask2.png
%im%\convert.exe -size 100x100 sample2bg.jpg mask2.png -background white -compose screen -composite sample47.jpg
元画像(sample2bg.jpg)

出力画像(sample47.jpg)

No comments:
Post a Comment