Split a Multipage TIFF File

Q:  How can I split a large multipage TIFF file?

A:  If you have a multipage TIFF file you can easily split into two pieces. The TIFF file should be maximum 24 bit per pixel image. The BITIFF.DLL contains a SplitTiffFile function that solves this problem. See the description of the function.So you can decrease the size of the image, and split up the image.

 

Code example:

     #include “BiTiff.h”

     …

     char szSourceFile[MAX_PATH], szNewFile[MAX_PATH];

     int    iPage;

     BOOL bOK;

     strcpy(szSourceFile, “c:\\splitImg.tif”);

     strcpy(szNewFile, “c:\\destImg.tif”);

     iPage = 2;

     //split the file

     BeginWaitCursor();

     bOK = SplitTiffFile(szSourceFile, szNewFile, iPage, NULL, NULL);

     EndWaitCursor();