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
Round crop using imagemagic
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Round crop using imagemagic
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.
http://imagemagick.org/Usage/channels/
EDIT: the above link has been fixed.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Round crop using imagemagic
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
$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