DeleteTiffImage

#include "BITIFF.H"

 

BOOL CALLBACK DeleteTiffImage( LPTSTR       lpszFileName,
int         nImage
BOOL  bFast)

Description

Deletes an image from the TIFF file named lpszFileName. Does all low level calls internally in the DLL. To retrieve the last error, use the TiffErrorString().

Parameters

LPTSTR

lpszFileName

Path to the TIFF file.

int

nImage

The zero based position to delete the image at.

BOOL

bFast

If TRUE, Document Imaging SDK uses the fast deleting method.
Otherwise the slow one is used.

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

The fast deleting method indicated by the bFast parameter does not delete the image psychically, and modifies the Image File Directory only, so the file size will NOT be changed. It is fast, because the images are not moved from a position to another position. Use this method when you should delete a large number of images at once. If you finished deleting images, you can call the ReorderTiffFile() function to reorder the file based on the Image File Directory (thus the physical image order will be the same as the logical). Calling the function with the bFast parameter set to TRUE for ONE image and then calling the ReorderTiffFile() is the same as calling the function with the bFast parameter set to FALSE.

If nImage is less than -1, the function does nothing and returns immediately with FALSE.

If nImage is greater than the number of images in the TIFF file, none of the images will be removed from the file and the return value will be FALSE. If you want to delete the last image from the TIFF file, please set the nImage parameter to -1. In this case you do not need to know the exact number of images in the file.

This function was designed to be used with high-level application generators like Borland C++, Visual Basic.

Requirements

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

Library :    Use BiTIFF.lib.

DLLs :       BiTiff.dll.

References to related functions

See InsertTiffImage(), ReorderTiffFile().