Page 1 of 1

Round crop using imagemagic

Posted: 2007-12-13T02:56:31-07:00
by soumya007
Hello all,

I'm trying to crop an image using imagemagic and I have done it successfully in general way. But now i'm trying to crop it in round shape. I have tried many things but didn't find any luck.

If you guyz have any idea then please help me out. This is very urgent for me.

Thanks in advance

Regards - Soumya

P.S: You can also write to me at soumyajit.soumya@gmail.com

Re: Round crop using imagemagic

Posted: 2007-12-17T00:21:54-07:00
by anthony
You either mask, the image or compose it against a circle shape on a transparent background. Both are covered by Channles and Masking in IM examples.
http://imagemagick.org/Usage/channels/

EDIT: the above link has been fixed.

Re: Round crop using imagemagic

Posted: 2010-02-09T21:19:22-07:00
by jokepondy
Hello Sowmya

$samp7 = "images/test1.jpg";
$samp101 = "images/circles.gif";

exec("convert $samp7 \( +clone -threshold -1 -negate -fill white -draw \"circle 64,64 64,0\" \) -alpha off -compose copy_opacity -composite $samp101");

Hope this will help for you ..try this.

Regards

John kennedy.s

Re: Round crop using imagemagic

Posted: 2010-02-09T21:44:14-07:00
by fmw42