CompactFile method (ILEADRasterIO)

Visual Basic example

Visual C++ 5.0 example

 

Syntax

short CompactFile(BSTR bstrSrcFile, BSTR bstrDstFile, long lFlags, long lPage, long uPages, short iModify, long lSavePage);

Overview

Refer to Loading and Saving Large TIFF Files

Remarks

Compacts TIFF files. It can also be used to copy or extract one or more pages from a TIFF file and copy them without recompression to another TIFF file.

Other properties of the ILEADRasterIO control can be used to control the behavior of the CompactFile method, as follows:

image\sqrblit.gif Use the LoadIFD property to designate the beginning of the source file. The lPage parameter of the CompactFile method designates the page relative to the virtual beginning of the source file. The virtual beginning of the file is:

image\sqrblit.gif the real beginning of the file, if the LoadIFD property is not set

or

image\sqrblit.gif the page indicated by LoadIFD, if the LoadIFD property is set.

image\sqrblit.gif Use the SaveIFD property to designate the beginning of the destination file. The lSavePage parameter of the CompactFile method designates the page relative to the virtual beginning of the destination file. The virtual beginning of the file is:

image\sqrblit.gif the real beginning of the file, if the SaveIFD property is not set

or

image\sqrblit.gif the page indicated by SaveIFD, if the SaveIFD property is set.

Use the iModify parameter to specify how to save a new page in a multipage file that supports insert and replace operations. In cases where there is conflict between iModify and lSavePage, the value of the iModify parameter takes precedence.

If you pass USE_MOTOROLA_ORDER to the lFlags parameter and you are creating a new file, the pages will be saved in Motorola byte order. If the flag is not passed, the pages will be saved in Intel byte order. If you are modifying an existing file, this flag has no meaning – the pages will be saved in the same byte order used in the file.

See Also

Elements:

Save method, Load method, GetFileInfo method, LoadIFD property, SaveIFD property

Topics:

Raster Images: Loading and Saving Large TIFF Files