'...
'Create an instance of ImageElement class
Dim imgElem As Neodynamic.WebControls.ImageDraw.ImageElement
imgElem = Neodynamic.WebControls.ImageDraw.ImageElement.FromUrl("~/images/bird.png")
'Create an instance of Silhouette class
Dim silhouette As New Neodynamic.WebControls.ImageDraw.Silhouette()
silhouette.Color = System.Drawing.Color.Silver
'Apply the action on the ImageElement
imgElem.Actions.Add(silhouette)
'Add the ImageElement to the Elements collection of the ImageDraw control
Me.ImageDraw1.Elements.Add(imgElem)
'...
//...
//Create an instance of ImageElement class
Neodynamic.WebControls.ImageDraw.ImageElement imgElem = Neodynamic.WebControls.ImageDraw.ImageElement.FromUrl("~/images/bird.png");
//Create an instance of Silhouette class
Neodynamic.WebControls.ImageDraw.Silhouette silhouette = new Neodynamic.WebControls.ImageDraw.Silhouette();
silhouette.Color = System.Drawing.Color.Silver;
//Apply the action on the ImageElement
imgElem.Actions.Add(silhouette);
//Add the ImageElement to the Elements collection of the ImageDraw controlthis.ImageDraw1.Elements.Add(imgElem);
//...
This action creates a Silhouette of an Element. A silhouette is a view of an object consisting of the outline and a featureless interior. Silhouette action is effective only for irregular images with transparent background.
In the following example we have a transparent PNG image (DO NOT use the image below because it was converted to JPEG) wrapped by an ImageElement on the Canvas and a Silhouette action is applied on the ImageElement.
ImageElement before the action is applied.
ImageElement with Silhouette action applied on it.