Main Page   Compound List   File List   Compound Members   File Members   Related Pages  

xtiffio.h File Reference

#include "cpl_serv.h"
#include "tiffio.h"

Go to the source code of this file.

Functions

TIFF CPL_DLL* XTIFFOpen (const char* name, const char* mode)
void CPL_DLL XTIFFClose (TIFF *tif)


Detailed Description

Definitions relating GeoTIFF functions from geotiff.h to the TIFF library (usually libtiff).


Function Documentation

void XTIFFClose ( TIFF * tif )
 

Close a file opened with XTIFFOpen().

Parameters:
tif   The file handle returned by XTIFFOpen().

If a GTIF structure was created with GTIFNew() for this file, it should be freed with GTIFFree() before calling XTIFFClose().

TIFF * XTIFFOpen ( const char * name,
const char * mode )
 

GeoTIFF compatible TIFF file open function.

Parameters:
name   The filename of a TIFF file to open.
mode   The open mode ("r", "w" or "a").

Returns:
a TIFF * for the file, or NULL if the open failed.

This function is used to open GeoTIFF files instead of TIFFOpen() from libtiff. Internally it calls TIFFOpen(), but sets up some extra hooks so that GeoTIFF tags can be extracted from the file. If XTIFFOpen() isn't used, GTIFNew() won't work properly. Files opened with XTIFFOpen() should be closed with XTIFFClose().

The name of the file to be opened should be passed as name, and an opening mode ("r", "w" or "a") acceptable to TIFFOpen() should be passed as the mode.

If XTIFFOpen() fails it will return NULL. Otherwise, normal TIFFOpen() error reporting steps will have already taken place.


Generated at Sun Mar 4 23:32:45 2001 for libgeotiff by doxygen1.2.3-20001105 written by Dimitri van Heesch, © 1997-2000