Create Multipage TIFF Files

Q:  How can I create multipage TIFF files?

A:  You can create easily a multipage TIFF file from two TIFF files with MergeTiffFilesmethod. This method is in the BITIFF.OCX. This method append the second file after the first TIFF file. You can create multipage TIFF files, and you can create many page in a single image. An other way to create multipage TIFF file to insert a page to the image with InsertTiffImage method. This method is in the BITIFF.OCX.

 

Code example:

       Dim BITiffobj As Object

       Dim fileName As String

       Dim szDest As String

       Dim bSuccess As Boolean

       szDest = “c:\dest.tif”

       Set BITiffobj = CreateObject("BITIFF.BITiffCtrl.1")

       bSuccess = BITiffobj.MergeTiffFiles(szDest, fileName)

       Set BITiffobj = Nothing

       …

       Private Const NORM_BIT_ORDER = 1

       Private Const TCOMP_NOCOMP = 201      ' Nocompression

       …

       Dim iInsImageIndexNew As Long

       …

       Set BITiffobj = CreateObject("BITIFF.BITiffCtrl.1")

       bSuccess = BITiffobj.InsertTiffImage(fileName, _

               hDib, TCOMP_NOCOMP, True, NORM_BIT_ORDER, iInsImageIndexNew, True, False)

       Set BITiffobj = Nothing