VintaSoft Twain .NET SDK 15.4: Documentation for Web developer
Vintasoft.Twain Namespace / WebAcquiredImageJS type / crop Property
Syntax Exceptions Remarks BrowserCompatibility SeeAlso
In This Topic
crop Method
In This Topic
Crops an image.
Syntax
var instance = new Vintasoft.Twain.WebAcquiredImageJS(twainDeviceManager, imageId, imageInfo);

var value; // Type: any

// Parameters
var x; // Type: number
var y; // Type: number
var width; // Type: number
var height; // Type: number

value = instance.crop(x, y, width, height);

Parameters

x
X-coordinate, in pixels, of the upper-left corner of the crop rectangle.
y
Y-coordinate, in pixels, of the upper-left corner of the crop rectangle.
width
Width, in pixels, of the crop rectangle.
height
Height, in pixels, of the crop rectangle.
Exceptions
ExceptionDescription
Thrown if arguments have wrong type OR image is in processing now OR image processing is failed.
Remarks

This function sends a synchronous request to crop an image. If you want to use asynchronous request instead of synchronous request, please use WebAcquiredImageJS.cropAsync function.

Browser Compatibility
9
See Also