Combining Images

 

There are several methods available to combine images.

 

 

[C++]

 

/* Merge TIFF files */

 

#include “BiTiff.h”

 

BOOL bRet;

char szDest[MAX_PATH], szSource[MAX_PATH];

 

strcpy(szDest, “C:\\Images\\Dest.tif”);

strcpy(szSource, C:\\Images\\Source.tif”);

 

/* 1. parameter: Path and name of the destination file

   2. parameter: Path and name of the source file

   3. parameter: Call back function, a developers can

display a progress bar.

4. parameter: This pointer is the third parameter of the

lpCallBackFunction.

 

   The szSource will be appended to the szDest. The

   szSource can be multipage TIFF image and every page in

   szSource will be appended to szDest. If szDest does not

   exist, the szSource will be copied to szDest. */

 

bRet = MergeTiffFiles(szDest, szSource, NULL, NULL);

 

if (!bRet)

{

            // Error

}

 

[VB]

 

‘ Merge TIFF files

 

Dim bRet As Boolean

Dim szSource As String

Dim szDest As String

Dim BITiffobj As Object

 

szSource = “C:\Images\Source.tif”

szDest = “C:\Images\Dest.tif”

 

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

 

‘ 1. parameter: Path and name of the destination file

‘ 2. parameter: Path and name of the source file

 

‘ The szSource will be appended to the szDest. The

‘ szSource can be multipage TIFF image and every page in

‘ szSource will be appended to szDest. If szDest does not

‘ exist, the szSource will be copied to szDest.

 

bRet = BITiffobj.MergeTiffFiles(szDest, szSource)

 

If Not bRet Then

            ‘ Error

End If

 

Set BITiffobj = Nothing

 

Note: Use the MergeTiffProgress event for get an event after a page has appended to the TIFF image.

 

[C#]

 

/* Merge TIFF files */

 

bool bRet;

string szSource, szDest;

 

szSource = “C:\\Images\\Source.tif”;

szDest = “C:\\Images\\Dest.tif”;

 

bRet = BiTiff.MergeTiffFiles(szDest, szSource);

 

if (!bRet)

{

            // Error

}

 

Note: Use the MergeTiffProgress event for get an event after a page has appended to the TIFF image.