Command for rounded corners doesn't do anything.
Posted: 2009-11-16T17:20:13-07:00
Hi,
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.
An echo of $convertCommandRoundedCorners outputs this
When I run this code the image created is identical with the original except that it's a few bytes lighter.
Could anyone give me some info on what I'm doing wrong?
Thanks.
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.