I\'m trying to crop an image to a circle, where the area outside of the circle is white.
The new image dimensions would be the same as the original, just effectively
You could achieve this with HTML and CSS3.
HTML
CSS
.circular {
width: 300px;
height: 300px;
border-radius: 150px;
-webkit-border-radius: 150px;
-moz-border-radius: 150px;
background: url(http://link-to-your/image.jpg) no-repeat;
}
So for your project you could add a div with runat="server", give it a CSS-class and an ID and programatically add the background to the one you want.
C#
yourDiv.Attributes.Add("style", "background: url(" + yourLink + ") no-repeat);
Check this link for more info. http://bavotasan.com/2011/circular-images-with-css3/