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);
function crop(
: number,
: number,
: number,
: number
) : any;
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
Exception | Description |
| 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
See Also