The leading provider of version control solutions and TWAIN SDKs
  • Contact us









SaveSelectedImagesToBytes Method

Description

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

Syntax

Uint32 ObjectName. SaveSelectedImagesToBytes(in Uint32 bufferSize, inout Variant * buffer)

Parameters

in Uint32 bufferSize: specified the buffer size

inout Variant * buffer: A byte array of the image data.

Remarks

The method should be called after GetSelectedImagesSize 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.

See also

SaveAsTIFF(), SaveAsJPEG(), SaveAsBMP(), SaveAsPNG(), FTPUpload(), FTPDownload(), HTTPUploadThroughPut(), HTTPUploadThroughPost(), HTTPDownload(), AllowMultiSelect, SaveSelectedImagesToBase64Binary

Sample

Javascript Sample:

	Webcam.SelectedImagesCount = 2;
	Webcam.SelectedImageIndex(0) = 4;// Set the 5th image as the first selected image.
	Webcam.SelectedImageIndex(1) = 3;// Set the 4th image as the second selected image.
	var size = Webcam.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;
	Webcam.SaveSelectedImagesToBytes(size, ary);