'...
'Create an instance of ImageElement class
Dim imgElem As Neodynamic.SDK.ImageElement
imgElem = Neodynamic.SDK.ImageElement.FromUrl("~/images/night.jpg")
'Create an instance of AdjustContrast class
Dim adjContrast As New Neodynamic.SDK.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.SDK.ImageElement imgElem = Neodynamic.SDK.ImageElement.FromUrl("~/images/night.jpg");
//Create an instance of AdjustContrast class
Neodynamic.SDK.AdjustContrast adjContrast = new Neodynamic.SDK.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.