Saves the selected images in buffer to a byte array in the specified file format.
| ActiveX Edition | Plug-in Edition | Mac Edition |
|---|---|---|
| Since V6.0 | Since V6.0 | Since V6.4 |
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:
WebTWAIN.SelectedImagesCount = 2;
WebTWAIN.SelectedImageIndex(0) = 4;// Set the 5th image as the first selected image.
WebTWAIN.SelectedImageIndex(1) = 3;// Set the 4th image as the second selected image.
var size = WebTWAIN.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;
WebTWAIN.SaveSelectedImagesToBytes(size, ary);
VB Sample:
Dim ary as Variant WebTWAIN.SelectedImagesCount = 2 WebTWAIN.SelectedImageIndex[0] = 4 WebTWAIN.SelectedImageIndex[1] = 3 Dim size as long Set size = WebTWAIN.GetSelectedImagesSize(2) Redim ary(size) as byte WebTWAIN.SaveSelectedImagesToBytes(size, ary)
TWAIN ActiveX |
TWAIN Plug-in |
TWAIN Control |
TWAIN SDK |
Scanner COM
Software Configuration Management |
Version Control |
Source Control
Copyright © 2012 Dynamsoft Corporation. All Rights Reserved.