Saves the image of a specified index in buffer to a byte array in the specified file format.

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

Syntax

C#
public byte[] SaveImageToBytes(
	short sImageIndex,
	DWTImageFileFormat enumImageFileFormat
)
Visual Basic
Public Function SaveImageToBytes ( _
	sImageIndex As Short, _
	enumImageFileFormat As DWTImageFileFormat _
) As Byte()

Parameters

sImageIndex
Type: System..::..Int16
Specifies the index of the image in buffer. The index is 0-based.
enumImageFileFormat
Type: Dynamsoft.DotNet.TWAIN.Enums..::..DWTImageFileFormat
DWTImageFileFormat type, specifies the file format

Return Value

A byte array where the image will be saved.

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