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