Sets a specified video property.

Data type



.Addon.Webcam.SetVideoPropertySetting(iProperty, iValue, bAuto);


<int> iProperty: Specifies the property to change, allowed values are:

Allowed Values EnumDWT_VideoProperty enumeration Description
0 EnumDWT_VideoProperty.VP_BRIGHTNESS Specifies the brightness, also called the black level. For NTSC, the value is expressed in IRE units * 100. For non-NTSC sources, the units are arbitrary, with zero representing blanking and 10,000 representing pure white. Values range from –10,000 to 10,000.
1 EnumDWT_VideoProperty.VP_CONTRAST Specifies the contrast, expressed as gain factor * 100. Values range from zero to 10,000.
2 EnumDWT_VideoProperty.VP_HUE Specifies the hue, in degrees * 100. Values range from -180,000 to 180,000 (-180 to +180 degrees).
3 EnumDWT_VideoProperty.VP_SATURATION Specifies the saturation. Values range from 0 to 10,000.
4 EnumDWT_VideoProperty.VP_SHARPNESS Specifies the sharpness. Values range from 0 to 100.
5 EnumDWT_VideoProperty.VP_GAMMA Specifies the gamma, as gamma * 100. Values range from 1 to 500.
6 EnumDWT_VideoProperty.VP_COLORENABLE Specifies the color enable setting. The possible values are 0 (off) and 1 (on).
7 EnumDWT_VideoProperty.VP_WHITEBALANCE Specifies the white balance, as a color temperature in degrees Kelvin. The range of values depends on the device.
8 EnumDWT_VideoProperty.VP_BACKLIGHTCOMPENSATION Specifies the backlight compensation setting. Possible values are 0 (off) and 1 (on).
9 EnumDWT_VideoProperty.VP_GAIN Specifies the gain adjustment. Zero is normal. Positive values are brighter and negative values are darker. The range of values depends on the device.

<int> iValue: Specifies the new value to be set to the property.

<bool> bAuto: Specifies whether the setting is controlled manually or automatically.

Return value


true indicates success. false indicates failure.


The method should be called after Addon.Webcam.SelectSource. If there is only one data source available, it will be selected automatically.


DWObject.Addon.Webcam.SetVideoPropertySetting(EnumDWT_VideoProperty.VP_BRIGHTNESS, 100, false);
// optional
var OnCaptureStart = function () {
// optional
var OnCaptureSuccess = function () {
// optional
var OnCaptureError = function (error, errorstr) {
// optional
var OnCaptureEnd = function () {
DWObject.Addon.Webcam.CaptureImage(false, OnCaptureStart, OnCaptureSuccess, OnCaptureError, OnCaptureEnd);

See also





Is this page helpful?

Leave a Reply

Your email address will not be published.