Contrast Property
Description
Returns or sets the contrast values available within the Source. This is a runtime property.
| ActiveX Edition | Plug-in Edition | Mac Edition |
|---|---|---|
| Since V3.0 | Since V3.0 | Since V6.4 |
Data type
float
Syntax
ObjectName. Contrast
Remarks
Using this property after calling OpenSource() method and before calling AcquireImage().
When an error occurs and IfThrowException property is TRUE, an exception will be thrown. Check ErrorCode property and ErrorString property for error information.
See also
ContrastMinValue property, ContrastMaxValue property, ContrastStepDelta property, ContrastDefaultValue property, IfAutoContrast property.
Sample
A JavaScript sample is provided.
<script language="javascript">
function btnManageContrast_onclick() {
Webcam.OpenSource();
Contrast = Webcam.Contrast; //get the contrast value
ContrastMinValue = Webcam.ContrastMinValue;//get the minimum contrast value
ContrastMaxValue = Webcam.ContrastMaxValue;//get the maximum contrast value
ContrastDefaultValue = Webcam.ContrastDefaultValue;//get the default contrast value
ContrastStepDelta = Webcam.ContrastStepDelta;//get the contrast step delta
Webcam.Contrast = 1;//change the contrast value to 1
Contrast = Webcam.Contrast; //get the contrast value
}
</script>
Copyright © 2012 Dynamsoft Corporation.All Rights Reserved.
