Saves the image of a specified index in buffer as a PNG file.

Namespace: Dynamsoft.DotNet.TWAIN
Assembly: DynamicDotNetTWAIN (in DynamicDotNetTWAIN.dll) Version: 3.0.0.0 (3.0.0.0)

Syntax

C#
public bool SaveAsPNG(
	string strFileName,
	short sImageIndex
)
Visual Basic
Public Function SaveAsPNG ( _
	strFileName As String, _
	sImageIndex As Short _
) As Boolean

Parameters

strFileName
Type: System..::..String
The name of the PNG file to be saved. It should be a local path on the local disk.
sImageIndex
Type: System..::..Int16
Specifies the index of image in buffer. The index is 0-based.

Return Value

True indicates success. False indicates failure.

Exceptions

ExceptionCondition
Dynamsoft.DotNet.TWAIN..::..TwainException When an error occurs and IfThrowException property is true, an exception will be thrown. When IfThrowException property is false, please check ErrorCode and ErrorString.

See Also