|
LibTIFF 4.7.2
TIFF library public API and implementation reference
|
The Compression registry interfaces describe the process-global codec registry. Built-ins remain known even when their compression dependency was not enabled. TIFFFindCODEC() can therefore return a descriptor for unavailable support. TIFFIsCODECConfigured() tests the selected callback against the build stub; it does not execute that callback or prove that a particular image works.
Registrations take precedence newest first and can shadow built-ins. Registry access is unsynchronised: serialise lookup, enumeration, registration, and removal. A registration owns its descriptor and copied name; unregister consumes its exact token. It does not clean up handles that already installed the codec. Keep callback code and its context live for those handles as well as for the registration itself.
TIFFGetConfiguredCODECs() returns an owned name-NULL-terminated array, freed with _TIFFfree(). Descriptor names and callback pointers are shallow copies. Unregistering can invalidate names in an earlier snapshot. Enumeration can include duplicates, shadowed built-ins, and registered records with a NULL initialiser. Do not treat the result as a unique, validated capability list.
The Compression registry and dispatch group describes default/fallback methods, installation, built-in descriptors, and registration nodes. Setting a scheme resets methods and invokes its initialiser; the caller must clean up previous codec state first. Unknown or build-disabled schemes can be accepted so callers can inspect metadata. Build-disabled codecs report an error and fail when their setup callback is invoked, so their pixel transfers fail. Unknown schemes keep the default transfer methods: decoding fallbacks return zero and their reads fail, but encoding fallbacks return minus one. Encoded strip and tile writes test encoder callbacks only for nonzero, so those negative errors are accepted and the writes can return a success count with no data stored; see TIFFWriteEncodedStrip(). Method installation and initialiser failure do not provide rollback.
Individual codec and predictor groups describe state, tag-method chaining, buffer ownership, and their specific transfer contracts. Optional dependencies and build settings determine executable support; the reference includes source contracts for all implementations regardless of local availability.
See Predictor method chains and transforms for the shared predictor prefix, transforms and teardown.
See Uncompressed and byte-run codecs for uncompressed, PackBits, ThunderScan and NeXT callbacks.
See LZW dictionaries and restart state for standard and compatibility LZW dictionaries and transfers.
See ZSTD streaming codec for ZSTD streaming codec state and transfer contracts.
See LZMA2 streaming codec for LZMA2 streaming codec state and transfer contracts.
See Deflate codec for Deflate codec state and transfer contracts.
See WebP frame codec for WebP frame codec state and transfer contracts.
See JBIG plane codec for JBIG plane codec state and transfer contracts.
See LERC frame codec for LERC frame codec state and transfer contracts.
See CCITT fax codecs for CCITT fax codecs state and transfer contracts.
See PixarLog codec for PixarLog codec state and transfer contracts.
See SGILog codec for SGILog codec state and transfer contracts.
See JPEG dependency interface for JPEG dependency interface state and transfer contracts.
See JPEG-in-TIFF transfers and setup for JPEG-in-TIFF setup, sampled transfer and twelve-bit dispatch.
See Old-style JPEG reconstruction for Old-style JPEG reconstruction state and transfer contracts.