#include "BITIFF.H"
BOOL CALLBACK ModiTiffFileInfo( TIFFFILE hChain,
LPTSTR lpszFileName,
int nByteOrder)
Description
This function modifies the filename and byte order associated with an image chain. If lpszFileName or nByteOrder is equal to 0, the function will not change the filename or byte order, respectively. The main purpose of this function is that if you create a new TIFF file with OpenTiffFile(), you can change the byte order setting from the default Intel-type LH_BYTE_ORDER to Motorola-type HL_BYTE_ORDER.
Parameters
TIFFFILE |
hChain |
Valid TIFF image chain handle. |
LPTSTR |
lpszFileName |
Filename and full path or NULL. |
int |
nByteOrder |
Either LH_BYTE_ORDER, HL_BYTE_ORDER or 0. |
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, FALSE if the path is too long or the value of nByteOrder is invalid. The function sets the error code to TPATHTOOLONG or TBADBYTEORDER in these cases. Call TiffError() to get the error code.
Programming notes
The function does NOT write anything to disk. Do not alter the byte order image by image! It must be constant in a given TIFF file.
Requirements
Header : Declared in BiTiff.h; include BiTiff.h.
Library : Use BiTIFF.lib.
DLLs : BiTiff.dll.
References to related functions
See GetTiffFileInfo() and OpenTiffFile().
Code example
#include "BITIFF.H"
TIFFFILE hTiff;
hTiff = OpenTiffFile((LPSTR)"new.tif",T_CREATE);
if(hTiff != NULL) // Creating OK.
{
// I want to use this TIFF file on a Macintosh which
// uses high-to-low byte order.
ModiTiffFileInfo(hTiff,NULL,HL_BYTE_ORDER);
}
...