roentgen b75cab
.\" $Id: TIFFcodec.3tiff,v 1.3 2011-08-02 14:09:43 bfriesen Exp $
roentgen b75cab
.\"
roentgen b75cab
.\" Copyright (c) 1995 Sam Leffler
roentgen b75cab
.\" Copyright (c) 1995 Silicon Graphics, Inc.
roentgen b75cab
.\"
roentgen b75cab
.\" Permission to use, copy, modify, distribute, and sell this software and 
roentgen b75cab
.\" its documentation for any purpose is hereby granted without fee, provided
roentgen b75cab
.\" that (i) the above copyright notices and this permission notice appear in
roentgen b75cab
.\" all copies of the software and related documentation, and (ii) the names of
roentgen b75cab
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
roentgen b75cab
.\" publicity relating to the software without the specific, prior written
roentgen b75cab
.\" permission of Sam Leffler and Silicon Graphics.
roentgen b75cab
.\" 
roentgen b75cab
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
roentgen b75cab
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
roentgen b75cab
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
roentgen b75cab
.\" 
roentgen b75cab
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
roentgen b75cab
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
roentgen b75cab
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
roentgen b75cab
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
roentgen b75cab
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
roentgen b75cab
.\" OF THIS SOFTWARE.
roentgen b75cab
.\"
roentgen b75cab
.if n .po 0
roentgen b75cab
.TH CODEC 3TIFF "October 29, 2004" "libtiff"
roentgen b75cab
.SH NAME
roentgen b75cab
TIFFFindCODEC, TIFFRegisterCODEC, TIFFUnRegisterCODEC, TIFFIsCODECConfigured
roentgen b75cab
\- codec-related utility routines
roentgen b75cab
.SH SYNOPSIS
roentgen b75cab
.B "#include <tiffio.h>"</tiffio.h>
roentgen b75cab
.sp
roentgen b75cab
.BI "const TIFFCodec* TIFFFindCODEC(uint16 " scheme ");"
roentgen b75cab
.br
roentgen b75cab
.BI "TIFFCodec* TIFFRegisterCODEC(uint16 " scheme ", const char *" method ", TIFFInitMethod " init ");"
roentgen b75cab
.br
roentgen b75cab
.BI "void TIFFUnRegisterCODEC(TIFFCodec *" codec ");"
roentgen b75cab
.br
roentgen b75cab
.BI "int TIFFIsCODECConfigured(uint16 " scheme ");"
roentgen b75cab
.SH DESCRIPTION
roentgen b75cab
.I libtiff
roentgen b75cab
supports a variety of compression schemes implemented by software
roentgen b75cab
.IR codecs .
roentgen b75cab
Each codec adheres to a modular interface that provides for
roentgen b75cab
the decoding and encoding of image data; as well as some other
roentgen b75cab
methods for initialization, setup, cleanup, and the control
roentgen b75cab
of default strip and tile sizes.
roentgen b75cab
Codecs are identified by the associated value of the 
roentgen b75cab
.SM TIFF
roentgen b75cab
.I Compression
roentgen b75cab
tag; e.g. 5 for
roentgen b75cab
.SM LZW
roentgen b75cab
compression.
roentgen b75cab
.PP
roentgen b75cab
The
roentgen b75cab
.I TIFFRegisterCODEC
roentgen b75cab
routine can be used to
roentgen b75cab
augment or override the set of codecs available to an application.
roentgen b75cab
If the specified
roentgen b75cab
.I scheme
roentgen b75cab
already has a registered codec then it is
roentgen b75cab
.I overridden
roentgen b75cab
and any images with data encoded with this
roentgen b75cab
compression scheme will be decoded using the supplied codec.
roentgen b75cab
.PP
roentgen b75cab
.I TIFFIsCODECConfigured
roentgen b75cab
returns 1 if the codec is configured and working. Otherwise 0 will be returned.
roentgen b75cab
.SH DIAGNOSTICS
roentgen b75cab
.BR "No space to register compression scheme %s" .
roentgen b75cab
.I TIFFRegisterCODEC
roentgen b75cab
was unable to allocate memory for the data structures needed
roentgen b75cab
to register a codec.
roentgen b75cab
.PP
roentgen b75cab
.BR "Cannot remove compression scheme %s; not registered" .
roentgen b75cab
.I TIFFUnRegisterCODEC
roentgen b75cab
did not locate the specified codec in the table of registered 
roentgen b75cab
compression schemes.
roentgen b75cab
.SH "SEE ALSO"
roentgen b75cab
.BR libtiff (3TIFF)
roentgen b75cab
.PP
roentgen b75cab
Libtiff library home page:
roentgen b75cab
.BR http://www.remotesensing.org/libtiff/