I'm trying to use ImageMagick(using PHP) to give rounded corners to my images. I've copied the code from here but it doesn't seem to do anything.
Code: Select all
$convertCommandRoundedCorners="convert ".$pathToImage." \
\( +clone -threshold -1 \
-draw 'fill black polygon 0,0 0,15 15,0 fill white circle 15,15 15,0' \
\( +clone -flip \) -compose Multiply -composite \
\( +clone -flop \) -compose Multiply -composite \
\) +matte -compose CopyOpacity -composite ".$pathToNewImage;
An echo of $convertCommandRoundedCorners outputs this
Code: Select all
convert /media/catalog/5e06319eda06f020e43594a9c230972d/0/1/01.image.jpg \
\( +clone -threshold -1 \
-draw 'fill black polygon 0,0 0,15 15,0 fill white circle 15,15 15,0' \
\( +clone -flip \) -compose Multiply -composite \
\( +clone -flop \) -compose Multiply -composite \
\) +matte -compose CopyOpacity -composite /media/catalog/5e06319eda06f020e43594a9c230972d/0/1/01.image2.jpg
Could anyone give me some info on what I'm doing wrong?
Thanks.