In This Topic
Sends an asynchronous request to save images from this image collection to a local file.
Syntax
var instance = new Vintasoft.Twain.WebAcquiredImageCollectionJS(twainDeviceManager);
var value; // Type: any
// Parameters
var filePath; // Type: string
var createNewFile; // Type: boolean
var imageIds; // Type: string[]
var successFunc; // Type: function
var errorFunc; // Type: function
value = instance.saveImagesAsync(filePath, createNewFile, imageIds, successFunc, errorFunc);
function saveImagesAsync(
: string,
: boolean,
: string[],
: Function,
: Function
) : any;
Parameters
- filePath
- A path to a local file.
- createNewFile
- A value indicating whether new file must be created.
- imageIds
- An array of strings, which define identifiers of images, which must be saved.
- successFunc
- A function that will be executed if request is executed successfully. Function prototype: "successFunc(imageCollection, filePath, createNewFile, imageIds)", where 'imageCollection' parameter is an instance of WebAcquiredImageCollectionJS class, 'filePath' parameter is path to the created image file, 'createNewFile' parameter is boolean value indicating whether new file is created, 'imageIds' parameter is array of image identifiers.
- errorFunc
- A function that will be executed if request is failed. Function prototype: "errorFunc(imageCollection, errorMessage)", where 'imageCollection' parameter is an instance of WebAcquiredImageJS class, 'errorMessage' parameter is string that describes error.
Exceptions
Exception | Description |
| Thrown if arguments have wrong type OR imageIds is not an array of strings OR images are not saved. |
Remarks
This function sends an asynchronous request to save images from this image collection to a local file. If you want to use synchronous request instead of asynchronous request, please use WebAcquiredImageCollectionJS.saveImages function.
Browser Compatibility
See Also