In This Topic
Sends an asynchronous request to detect border of image.
Syntax
var instance = new Vintasoft.Twain.WebAcquiredImageJS(twainDeviceManager, imageId, imageInfo);
var value; // Type: any
// Parameters
var borderSize; // Type: number
var successFunc; // Type: function
var errorFunc; // Type: function
value = instance.detectBorderAsync(borderSize, successFunc, errorFunc);
function detectBorderAsync(
: number,
: Function,
: Function
) : any;
Parameters
- borderSize
- Size of border around the image. Possible values: 0 - 100. Default value is 5.
- 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
Exception | Description |
| 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 detect border of image. If you want to use synchronous request instead of asynchronous request, please use WebAcquiredImageJS.detectBorder function.
Browser Compatibility
See Also