LoadImageEx Method

Description

Loads an image into the Dynamic Web TWAIN.

Syntax

Boolean ObjectName. LoadImageEx(String FileName, Long ImageType)

Parameters

String FileName: the name of the image to be loaded. It should be the absolute path of the image file on the local disk.

Long ImageType: the image format of the file to be loaded.

Return value

Boolean.

TRUE indicates success. FALSE indicates failure.

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.

Remarks

Dynamic Web TWAIN processes the image format according to the value of the ImageType.

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

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

See also

FTPDownload()HTTPDownload(), LoadDibFromClipboard(), LoadImage()

Sample

A JavaScript sample is provided.

<script language="javascript">
	function btnLoadImageEx_onclick() {
		frmScan.DynamicWebTwain1.LoadImageEx("G:/wwwroot/WebTWAIN/Images/ImageData.jpg",1);
	}
</script>