Hello,
I am wondering whats the best way to programmatically make rounded corners for images. This can be either using PHP or javascript. An algorithm will also do for the same and I can code it with Image::Magick or GD.
Thank you for your time.
Hello,
I am wondering whats the best way to programmatically make rounded corners for images. This can be either using PHP or javascript. An algorithm will also do for the same and I can code it with Image::Magick or GD.
Thank you for your time.
Well, it depends what exactly you need. Do you want the corners to be transparent, or filled in some color? Which image format?
Here is some help for making rounded corners: http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=8401
Check it out, and if it does not help, update your question with the specific problem. Then we can probably help :-):
use JavaScript to programatically get round corners
OR
you can use mozilla and safaris browser extensions to get round corners using CSS but it will work only in Mozilla and Safari
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
You can use the above mention tags with CSS, and for IE, use DDRoundies with some jquery code to make it work in IE. It is what I had to do to get it working. Good example of this is http://swiftmailer.org/ site. they make use of what I mentioned.
My favourite is Liquid Canvas. It's a jQuery plugin.
<div id="rounded">Test</div>
...
$('#rounded').liquidCanvas(
'[shadow border gradient] => roundedRect{radius:50}');
Take a look at the demo page for more examples.
Here are links for two PHP based solutions: