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

var value; // Type: any

// Parameters
var canvasWidth; // Type: number
var canvasHeight; // Type: number
var canvasColor; // Type: number
var imageXPosition; // Type: number
var imageYPosition; // Type: number

value = instance.resizeCanvas(canvasWidth, canvasHeight, canvasColor, imageXPosition, imageYPosition);

Parameters

canvasWidth
Width, in pixels, of the image canvas.
canvasHeight
Height, in pixels, of the image canvas.
canvasColor
Color of the image canvas. Possible values: 0-AutoDetect, 1-Black, 2-White.
imageXPosition
X position, in pixels, of the original image within new image.
imageYPosition
Y position, in pixels, of the original image within new image.
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 resize canvas of image. If you want to use asynchronous request instead of synchronous request, please use WebAcquiredImageJS.resizeCanvasAsync function.

Browser Compatibility
9
See Also