Dynamsoft Home|Product Home

SaveAsTIFF Method

Description

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

Syntax

Boolean ObjectName. SaveAsTIFF(String FileName, Short sImageIndex)

Parameters

String FileName: the name of the TIFF file to be saved.

Short sImageIndex: specifies the index of image in buffer. The index is 0-based. 

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

TIFF is a built-in feature of Dynamic Web TWAIN, no other DLLs are required.

See also

IfTIFFMultiPage property, TIFFCompressionType property, SaveAsJPEG(), SaveAsBMP(), SaveAsPNG(), SaveAllAsMultiPageTIFF(), HTTPUploadThroughPut(), HTTPUploadThroughPost(), FTPUpload()

Samples

Save acquired images as a Multi-Page TIFF file.

VB Sample:
Private Sub Scan_Click()
Twain.OpenSource Twain.IfShowUI = False 'Set without user interface Twain.IfDisableSourceAfterAcquire = True Twain.AcquireImage
End Sub
Private Sub Twain_OnPostTransfer()    Twain.IfTiffMultiPage = True 'Save as multi-page TIFF    Twain.SaveAsTIFF "C:\SaveAsTIFF.tif", 0
   If (Twain.ErrorCode <> 0) Then        MsgBox (Twain.ErrorString)    Else 'succeded        MsgBox ("Successful")    End If
End Sub

Save each document in a separate TIFF file.