TWAIN ActiveX/Plug-in Windows/Mac HTTP Control/SDK

LoadImageFromBase64Binary Method

Description

Loads image from a base64 byte array with the specified file format.

Support information

ActiveX Edition Plug-in Edition Mac Edition
Since V6.2 Since V6.2 Since V6.4

Syntax

ObjectName.LoadImageFromBase64Binary(string ImageData, long ImageType)

Parameters

string ImageData: specifies the base64 string data.

long ImageType: specifies the file format.

Return value

True indicates success. False indicates failure.

Remarks

Dynamic Web TWAIN supports the following types of image files:

Allowed Values ImageType
0 BMP
1 JPEG
2 TIFF
3 PNG
4 PDF

The loaded image will be displayed in the Dynamic Web TWAIN.

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

LoadImage method, LoadImageEx method, LoadImageFromBytes method, SaveSelectedImagesToBase64Binary method
 

Sample

Javascript Sample:

	 
    var imagedata;
    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.

 	 WebTWAIN.GetSelectedImagesSize(1); //jpeg
	 imagedata = WebTWAIN.SaveSelectedImagesToBase64Binary();
	 WebTWAIN.LoadImageFromBase64Binary(imagedata,1);
	 alert(WebTWAIN.ErrorString);




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.