'...
'Create an instance of ImageElement class
Dim imgElem As Neodynamic.WebControls.ImageDraw.ImageElement
imgElem = Neodynamic.WebControls.ImageDraw.ImageElement.FromUrl("~/images/night.jpg")
'Create an instance of AdjustContrast class
Dim adjContrast As New Neodynamic.WebControls.ImageDraw.AdjustContrast()
'Set the contrast level
adjContrast.Level = 60
'Apply the action on the ImageElement
imgElem.Actions.Add(adjContrast)
'Add the ImageElement to the Elements collection of the ImageDraw control
Me.ImageDraw1.Elements.Add(imgElem)
'Add the TextElement to the Elements collection of the ImageDraw control
'...
//...
//Create an instance of ImageElement class
Neodynamic.WebControls.ImageDraw.ImageElement imgElem = Neodynamic.WebControls.ImageDraw.ImageElement.FromUrl("~/images/night.jpg");
//Create an instance of AdjustContrast class
Neodynamic.WebControls.ImageDraw.AdjustContrast adjContrast = new Neodynamic.WebControls.ImageDraw.AdjustContrast();
//Set the contrast level
adjContrast.Level = 60;
//Apply the action on the ImageElement
imgElem.Actions.Add(adjContrast);
//Add the ImageElement to the Elements collection of the ImageDraw controlthis.ImageDraw1.Elements.Add(imgElem);
//Add the TextElement to the Elements collection of the ImageDraw control
//...
This action adjusts the contrast of an Element. Contrast is adjusted by specifying a level value which ranges from -100 (dark) to 100 (light). This action is typically used when correcting images that are too dark or too light.
In the following example we have an ImageElement and a TextElement on the Canvas and an AdjustContrast action is applied on the ImageElement only.