CutTiffFile

#include "BITIFF.H"

 

BOOL CALLBACK CutTiffFile( LPCTSTR                szSourceFileName,
LPCTSTR                szPrefixFileName,
int                             nImage,
PROGRESSPROC  lpCallBackFunction,
void*                        lpUser)

Description

This function will cut (remove) the first nImage images from the szSourceFileName multipage TIFF File. The nImage is a zero based integer.

Parameters

LPCTSTR

szSourceFileName

Source TIFF File. It must be a multipage TIFF File.

LPCTSTR

szPrefixFileName

The path and prefix for the destination TIFF File. The CutTiffFile will append 0001 for the first image 0002 for the second image and so on.

int

nImage

The number of image to be cut from the beginning of the TIFF File.

PROGRESSPROC 

lpCallBackFunction

Call back function, a developer can write a function to display a progress bar. If the lpCallBackFunction is not null this function is called for every image.

Void*

lpUser

This pointer is the third parameter of the lpCallBackFunction.

Additional Information

This example shows how to use the dll when loading statically including the header file. Otherwise if the dll is loaded dynamically, for further information read the “About the difference of static and dynamic library loading” section of the manual.

Return values

TRUE on success, otherwise FALSE.

Programming notes

If nImage is less than 1 or greater than number of images, the function does nothing and returns immediately with FALSE.

int CALLBACK lpCallBackFunction(   int nTotalNumberOfImages, int nCurrentImage,
void* lpUser)

int                    nTotalNumberOfImages            The number of images to be cut.

int                    nCurrentImage                           The current image to be cut.

void*               lpUser                                         The developers can add a pointer to the
function.

Requirements

Header :     Declared in BiTiff.h; include BiTiff.h.

Library :    Use BiTIFF.lib.

DLLs :       BiTiff.dll.

References to related functions

See SplitTiffFile(), MergeTiffFiles().