2012-01-26 23 views
2

私は424x318の画像を持っています。私は円を描き、残りは透明にします。私はその円を取ってそれを切り出したいと思う。これどうやってするの?ImageMagickサークルからの四角形?

My機能(bashの変数であるだけで、通常のもの、$ SCALEFILEは、$ NEWFILEはそれとしてそれを保存し、$サイズは普通の大きさの文字列X0、Y0のX1、Y1は何かということですファイルです)

convert -size 416x318 xc:none -fill $SCALEFILE -draw "circle $SIZE" $NEWFILE

ps。私の円の寸法が変わります。

ありがとうございます!

答えて

1

-crop WxH + X + Y + repageを使用して円を切り抜くことができます。例えば

convert -size 300x300 xc:transparent -fill "image.png" -draw "circle 240,90 290,90" -crop 100x100+190+40 +repage circle1.png 
convert -size 300x300 xc:transparent -fill "image.png" -draw "circle 70,90 110,90" -crop 100x100+20+40 +repage circle2.png 

enter image description here

関連する問題