Saves the selected images in buffer to a byte array in the specified file format.
Uint32 ObjectName. SaveSelectedImagesToBytes(in Uint32 bufferSize, inout Variant * buffer)
in Uint32 bufferSize: specified the buffer size
inout Variant * buffer: A byte array of the image data.
The method should be called after GetSelectedImageSize method.
When an error occurs and IfThrowException property is TRUE, an exception will be thrown.
When FALSE is returned or an exception is thrown, check ErrorCode property and ErrorString property for error information.
SaveAsTIFF(), SaveAsJPEG(), SaveAsBMP(), SaveAsPNG(), FTPUpload(), FTPDownload(), HTTPUploadThroughPut(), HTTPUploadThroughPost(), HTTPDownload(), AllowMultiSelect, SaveSelectedImagesToBase64Binary
Javascript Sample:
Twain.SelectedImagesCount = 2;
Twain.SelectedImageIndex(0) = 4;// Set the 5th image as the first selected image.
Twain.SelectedImageIndex(1) = 3;// Set the 4th image as the second selected image.
var size = Twain.GetSelectedImagesSize(2); //Calculate the size of selected images in TIFF format
var ary = new Array(size);
for (var i =0; i<size; i++)
ary[i] = 0;
Twain.SaveSelectedImagesToBytes(size, ary);
|
VB Sample:
Dim ary as Variant Twain.SelectedImagesCount = 2 Twain.SelectedImageIndex[0] = 4 Twain.SelectedImageIndex[1] = 3 Dim size as long Set size = Twain.GetSelectedImagesSize(2) Redim ary(size) as byte Twain.SaveSelectedImagesToBytes(size, ary) |
TWAIN ActiveX | TWAIN Plug-in | TWAIN Control | TWAIN SDK | Scanner COM
Software Configuration Management | Version Control | Source Control
Copyright © 2011 Dynamsoft Corporation. All Rights Reserved.