VintaSoft Twain .NET SDK 15.0: Documentation for Web developer
Vintasoft.Twain Namespace / WebAcquiredImageJS type / changeContrastAsync Property
Syntax Exceptions Remarks BrowserCompatibility SeeAlso
In This Topic
    changeContrastAsync Method
    In This Topic
    Sends an asynchronous request to change contrast of image.
    Syntax
    var instance = new Vintasoft.Twain.WebAcquiredImageJS(twainDeviceManager, imageId, imageInfo);
    
    var value; // Type: any
    
    // Parameters
    var contrastValue; // Type: number
    var successFunc; // Type: function
    var errorFunc; // Type: function
    
    value = instance.changeContrastAsync(contrastValue, successFunc, errorFunc);
    
    
    function changeContrastAsync(
    contrastValue
    The contrast value in percents. Valid values are from -100 to 100. Default value is 0. Contrast is not changed if value of this property is set to 0.
    : number,
    successFunc
    A function that will be executed if request is executed successfully. Function prototype: "successFunc(image)", where 'image' parameter is an instance of WebAcquiredImageJS class.
    : Function,
    errorFunc
    A function that will be executed if request is failed. Function prototype: "errorFunc(image, errorMessage)", where 'image' parameter is an instance of WebAcquiredImageJS class, 'errorMessage' parameter is string that describes error.
    : Function
    ) : any;

    Parameters

    contrastValue
    The contrast value in percents. Valid values are from -100 to 100. Default value is 0. Contrast is not changed if value of this property is set to 0.
    successFunc
    A function that will be executed if request is executed successfully. Function prototype: "successFunc(image)", where 'image' parameter is an instance of WebAcquiredImageJS class.
    errorFunc
    A function that will be executed if request is failed. Function prototype: "errorFunc(image, errorMessage)", where 'image' parameter is an instance of WebAcquiredImageJS class, 'errorMessage' parameter is string that describes error.
    Exceptions
    ExceptionDescription
    Thrown if argument has wrong type OR image is in processing now OR image processing is failed.
    Remarks

    This function sends an asynchronous request to change contrast of image. If you want to use synchronous request instead of asynchronous request, please use WebAcquiredImageJS.changeContrast function.

    Browser Compatibility
    9
    See Also