Combining Images

 

There are several methods available to combine images.

 

 

[C++]

 

/* Merge TIFF files */

 

#include “BiTiff.h”

 

BOOL bRet;

TCHAR szDest[MAX_PATH], szSource[MAX_PATH];

 

_tcscpy_s(szDest, MAX_PATH , _T(“C:\\Images\\Dest.tif”));

_tcscpy_s(szSource, MAX_PATH , _T(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

}

 

[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.