LibTIFF 4.7.2
TIFF library public API and implementation reference
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions
tiffio.h File Reference

Declare the public C library interface and its supporting types. More...

#include "tiff.h"
#include "tiffvers.h"
#include <stdarg.h>
#include <stdio.h>
Include dependency graph for tiffio.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  TIFFDisplay
 Describe the matrix, luminance, and gamma of an RGB display. More...
 
struct  TIFFYCbCrToRGB
 Hold lookup-table pointers for 8-bit YCbCr-to-RGB conversion. More...
 
struct  TIFFCIELabToRGB
 Hold CIE L*a*b*-to-RGB conversion parameters and tables. More...
 
struct  _TIFFRGBAImage
 Hold the state and selected callbacks for an RGBA image reader. More...
 
struct  TIFFCodec
 Describe a named compression scheme and its initialiser. More...
 
struct  TIFFRational_t
 Represent an unsigned TIFF rational as numerator and denominator. More...
 
struct  TIFFTagMethods
 Collect a handle's tag-access and directory-print callbacks. More...
 
struct  TIFFFieldInfo
 Describe a tag using the legacy field-registration interface. More...
 

Macros

#define TIFF_TMSIZE_T_MAX   (tmsize_t)(SIZE_MAX >> 1)
 Define the largest positive size representable by tmsize_t.
 
#define TIFFPRINT_NONE   0x0 /* no extra info */
 Request no optional large-data expansions in TIFFPrintDirectory().
 
#define TIFFPRINT_STRIPS   0x1 /* strips/tiles info */
 Include strip/tile offsets and byte counts in directory printing.
 
#define TIFFPRINT_CURVES   0x2 /* color/gray response curves */
 Include transfer-function curves in directory printing.
 
#define TIFFPRINT_COLORMAP   0x4 /* colormap */
 Include palette entries in directory printing.
 
#define TIFFPRINT_JPEGQTABLES   0x100 /* JPEG Q matrices */
 Retain the legacy JPEG quantisation-table print flag.
 
#define TIFFPRINT_JPEGACTABLES   0x200 /* JPEG AC tables */
 Retain the legacy JPEG AC-table print flag.
 
#define TIFFPRINT_JPEGDCTABLES   0x200 /* JPEG DC tables */
 Retain the legacy JPEG DC-table print flag.
 
#define D65_X0   (95.0470f)
 Define the D65 reference-white X coordinate, scaled to Y = 100.
 
#define D65_Y0   (100.0f)
 Define the D65 reference-white Y coordinate (100).
 
#define D65_Z0   (108.8827f)
 Define the D65 reference-white Z coordinate, scaled to Y = 100.
 
#define D50_X0   (96.4250f)
 Define the D50 reference-white X coordinate, scaled to Y = 100.
 
#define D50_Y0   (100.0f)
 Define the D50 reference-white Y coordinate (100).
 
#define D50_Z0   (82.4680f)
 Define the D50 reference-white Z coordinate, scaled to Y = 100.
 
#define CIELABTORGB_TABLE_RANGE   1500
 Define the largest CIE L*a*b*-to-RGB lookup-table index.
 
#define TIFFGetR(abgr)   ((abgr) & 0xff)
 Extract the red byte from a packed ABGR pixel value.
 
#define TIFFGetG(abgr)   (((abgr) >> 8) & 0xff)
 Extract the green byte from a packed ABGR pixel value.
 
#define TIFFGetB(abgr)   (((abgr) >> 16) & 0xff)
 Extract the blue byte from a packed ABGR pixel value.
 
#define TIFFGetA(abgr)   (((abgr) >> 24) & 0xff)
 Extract the alpha byte from a packed ABGR pixel value.
 
#define LOGLUV_PUBLIC   1
 Control declaration of shared LogLuv conversion functions.
 
#define TIFF_ATTRIBUTE(x)   /*nothing*/
 Expand a compiler attribute in a public declaration when supported.
 
#define TIFF_ANY   TIFF_NOTYPE /* for field descriptor searching */
 Match any data type when searching for a field descriptor.
 
#define TIFF_VARIABLE   -1 /* marker for variable length tags */
 Mark a variable-length field with a 16-bit count convention.
 
#define TIFF_SPP   -2 /* marker for SamplesPerPixel tags */
 Mark a field whose count follows SamplesPerPixel.
 
#define TIFF_VARIABLE2   -3 /* marker for uint32_t var-length tags */
 Mark a variable-length field with a 32-bit count convention.
 
#define FIELD_CUSTOM   65
 Identify a field stored through the custom-metadata mechanism.
 
#define U_NEU   0.210526316
 Select neutral u-prime chromaticity.
 
#define V_NEU   0.473684211
 Select neutral v-prime chromaticity.
 
#define UVSCALE   410.
 Scale uniform eight-bit chromaticity for LogLuv32.
 

Typedefs

typedef struct tiff TIFF
 Refer to an opaque open TIFF library instance.
 
typedef TIFF_SSIZE_T tmsize_t
 Represent a signed memory or I/O size in bytes.
 
typedef uint64_t toff_t
 Represent an unsigned file byte offset independently of off_t.
 
typedef uint32_t tdir_t
 Represent a zero-based directory index, rather than a file offset.
 
typedef uint32_t ttag_t
 Represent a legacy directory tag identifier.
 
typedef uint16_t tsample_t
 Represent a legacy sample index.
 
typedef uint32_t tstrile_t
 Represent a legacy strip or tile index.
 
typedef tstrile_t tstrip_t
 Represent a legacy strip index.
 
typedef tstrile_t ttile_t
 Represent a legacy tile index.
 
typedef tmsize_t tsize_t
 Represent a legacy signed I/O byte count.
 
typedef void * tdata_t
 Represent a legacy untyped image-data pointer.
 
typedef void * thandle_t
 Carry an opaque client I/O context through library callbacks.
 
typedef unsigned char TIFFRGBValue
 Represent an 8-bit RGB channel value.
 
typedef struct _TIFFRGBAImage TIFFRGBAImage
 Name the RGBA reader state type.
 
typedef void(* tileContigRoutine) (TIFFRGBAImage *img, uint32_t *cp, uint32_t x, uint32_t y, uint32_t w, uint32_t h, int32_t fromskew, int32_t toskew, unsigned char *pp)
 Convert a decoded contiguous region through a caller-selectable packer.
 
typedef void(* tileSeparateRoutine) (TIFFRGBAImage *img, uint32_t *cp, uint32_t x, uint32_t y, uint32_t w, uint32_t h, int32_t fromskew, int32_t toskew, unsigned char *r, unsigned char *g, unsigned char *b, unsigned char *a)
 Convert a decoded separate-plane region through a caller-selectable packer.
 
typedef int(* TIFFInitMethod) (TIFF *tif, int scheme)
 Install compression methods and private state on a handle.
 
typedef void(* TIFFErrorHandler) (const char *module, const char *fmt, va_list ap)
 Handle a library-wide error or warning diagnostic.
 
typedef void(* TIFFErrorHandlerExt) (thandle_t fd, const char *module, const char *fmt, va_list ap)
 Handle a library-wide error or warning diagnostic.
 
typedef int(* TIFFErrorHandlerExtR) (TIFF *tif, void *user_data, const char *module, const char *fmt, va_list ap)
 Handle a diagnostic using a per-handle borrowed context.
 
typedef tmsize_t(* TIFFReadWriteProc) (thandle_t fd, void *buf, tmsize_t size)
 Transfer bytes at the current position of a client I/O resource.
 
typedef toff_t(* TIFFSeekProc) (thandle_t fd, toff_t off, int whence)
 Change the current position of a client I/O resource.
 
typedef int(* TIFFCloseProc) (thandle_t fd)
 Release a client I/O resource or its adapter context.
 
typedef toff_t(* TIFFSizeProc) (thandle_t fd)
 Query the byte length of a client I/O resource.
 
typedef int(* TIFFMapFileProc) (thandle_t fd, void **base, toff_t *size)
 Provide a readable whole-file view of a client resource.
 
typedef void(* TIFFUnmapFileProc) (thandle_t fd, void *base, toff_t size)
 Release a whole-file view supplied by a mapping callback.
 
typedef void(* TIFFExtendProc) (TIFF *tif)
 Extend the image-directory field table during default initialisation.
 
typedef struct _TIFFField TIFFField
 Refer to an opaque registered field descriptor.
 
typedef struct _TIFFFieldArray TIFFFieldArray
 Refer to an opaque collection of field descriptors.
 
typedef int(* TIFFVSetMethod) (TIFF *tif, uint32_t tag, va_list ap)
 Implement a handle's variadic tag setter.
 
typedef int(* TIFFVGetMethod) (TIFF *tif, uint32_t tag, va_list ap)
 Implement a handle's variadic tag getter.
 
typedef void(* TIFFPrintMethod) (TIFF *tif, FILE *fd, long flags)
 Append extension-specific directory information to a stream.
 
typedef struct TIFFOpenOptions TIFFOpenOptions
 Refer to opaque settings used when opening a TIFF handle.
 

Functions

const char * TIFFGetVersion (void)
 Return the version and copyright banner of the loaded library.
 
const TIFFCodec * TIFFFindCODEC (uint16_t scheme)
 Find the highest-priority descriptor for a compression scheme.
 
TIFFCodec * TIFFRegisterCODEC (uint16_t scheme, const char *name, TIFFInitMethod init)
 Register a codec descriptor ahead of built-in and older entries.
 
void TIFFUnRegisterCODEC (TIFFCodec *c)
 Remove and free an exact registered codec descriptor.
 
int TIFFIsCODECConfigured (uint16_t scheme)
 Check whether the selected descriptor has a configured initialiser.
 
TIFFCodec * TIFFGetConfiguredCODECs (void)
 Allocate a terminated snapshot of registered and configured codec descriptors.
 
void _TIFFfree (void *p)
 Release a block allocated by the public allocation family.
 
void * _TIFFmalloc (tmsize_t s)
 Allocate an uninitialised block through the public allocator.
 
void * _TIFFcalloc (tmsize_t nmemb, tmsize_t siz)
 Allocate a zero-filled array through the public allocator.
 
void * _TIFFrealloc (void *p, tmsize_t s)
 Resize a public-allocator block using platform realloc semantics.
 
void _TIFFmemset (void *p, int v, tmsize_t c)
 Fill a byte range with one repeated byte.
 
void _TIFFmemcpy (void *d, const void *s, tmsize_t c)
 Copy a non-overlapping byte range.
 
int _TIFFmemcmp (const void *p1, const void *p2, tmsize_t c)
 Compare two byte ranges lexicographically.
 
int TIFFGetTagListCount (TIFF *tif)
 Count values stored in the current custom-tag list.
 
uint32_t TIFFGetTagListEntry (TIFF *tif, int tag_index)
 Look up a tag number by its custom-value list index.
 
const TIFFField * TIFFFindField (TIFF *tif, uint32_t tag, TIFFDataType dt)
 Find a registered field by tag number and file data type.
 
const TIFFField * TIFFFieldWithTag (TIFF *tif, uint32_t tag)
 Find a registered field by tag number.
 
const TIFFField * TIFFFieldWithName (TIFF *tif, const char *field_name)
 Find a registered field by name.
 
uint32_t TIFFFieldTag (const TIFFField *fip)
 Read a field descriptor's tag number.
 
const char * TIFFFieldName (const TIFFField *fip)
 Read a field descriptor's name.
 
TIFFDataType TIFFFieldDataType (const TIFFField *fip)
 Read a field descriptor's on-disk data type.
 
int TIFFFieldPassCount (const TIFFField *fip)
 Test whether a field passes an explicit count argument.
 
int TIFFFieldReadCount (const TIFFField *fip)
 Read a field descriptor's getter count rule.
 
int TIFFFieldWriteCount (const TIFFField *fip)
 Read a field descriptor's setter count rule.
 
int TIFFFieldSetGetSize (const TIFFField *fip)
 Report the internal element storage width of a field.
 
int TIFFFieldSetGetCountSize (const TIFFField *fip)
 Report the count width encoded by a field's set/get representation.
 
int TIFFFieldIsAnonymous (const TIFFField *fip)
 Test whether a field was registered as an unknown tag.
 
TIFFTagMethods * TIFFAccessTagMethods (TIFF *tif)
 Expose a handle's mutable tag-method table.
 
void * TIFFGetClientInfo (TIFF *tif, const char *name)
 Look up a borrowed payload by its handle-local name.
 
void TIFFSetClientInfo (TIFF *tif, void *data, const char *name)
 Add or replace a handle-local named borrowed payload.
 
void TIFFCleanup (TIFF *tif)
 Release library state without invoking the client close callback.
 
void TIFFClose (TIFF *tif)
 Release a TIFF handle and invoke its client close callback.
 
int TIFFFlush (TIFF *tif)
 Flush pending image data and dirty directory information.
 
int TIFFFlushData (TIFF *tif)
 Flush pending encoded image data without committing directory changes.
 
int TIFFGetField (TIFF *tif, uint32_t tag,...)
 Query a present tag in the current directory.
 
int TIFFVGetField (TIFF *tif, uint32_t tag, va_list ap)
 Query a present tag in the current directory.
 
int TIFFGetFieldDefaulted (TIFF *tif, uint32_t tag,...)
 Query a present tag or a supported default.
 
int TIFFVGetFieldDefaulted (TIFF *tif, uint32_t tag, va_list ap)
 Query a present tag or a supported default.
 
int TIFFReadDirectory (TIFF *tif)
 Read and install the next image directory.
 
int TIFFReadCustomDirectory (TIFF *tif, toff_t diroff, const TIFFFieldArray *infoarray)
 Read metadata using an explicit custom field schema.
 
int TIFFReadEXIFDirectory (TIFF *tif, toff_t diroff)
 Read a EXIF metadata directory.
 
int TIFFReadGPSDirectory (TIFF *tif, toff_t diroff)
 Read a EXIF GPS metadata directory.
 
uint64_t TIFFScanlineSize64 (TIFF *tif)
 Compute the current scanline I/O byte estimate.
 
tmsize_t TIFFScanlineSize (TIFF *tif)
 Compute the current scanline I/O byte estimate.
 
uint64_t TIFFRasterScanlineSize64 (TIFF *tif)
 Compute the packed full-raster row byte count.
 
tmsize_t TIFFRasterScanlineSize (TIFF *tif)
 Compute the packed full-raster row byte count.
 
uint64_t TIFFStripSize64 (TIFF *tif)
 Compute the decoded-size estimate for a nominal strip.
 
tmsize_t TIFFStripSize (TIFF *tif)
 Compute the decoded-size estimate for a nominal strip.
 
uint64_t TIFFRawStripSize64 (TIFF *tif, uint32_t strip)
 Query the stored byte count for one raw strip.
 
tmsize_t TIFFRawStripSize (TIFF *tif, uint32_t strip)
 Convert one raw-strip byte count to the legacy signed-size result.
 
uint64_t TIFFVStripSize64 (TIFF *tif, uint32_t nrows)
 Compute the decoded-size estimate for a requested strip height.
 
tmsize_t TIFFVStripSize (TIFF *tif, uint32_t nrows)
 Compute the decoded-size estimate for a requested strip height.
 
uint64_t TIFFTileRowSize64 (TIFF *tif)
 Compute the packed byte count of one tile row.
 
tmsize_t TIFFTileRowSize (TIFF *tif)
 Compute the packed byte count of one tile row.
 
uint64_t TIFFTileSize64 (TIFF *tif)
 Compute the decoded-size estimate for the configured tile height.
 
tmsize_t TIFFTileSize (TIFF *tif)
 Compute the decoded-size estimate for the configured tile height.
 
uint64_t TIFFVTileSize64 (TIFF *tif, uint32_t nrows)
 Compute the decoded-size estimate for a requested tile height.
 
tmsize_t TIFFVTileSize (TIFF *tif, uint32_t nrows)
 Compute the decoded-size estimate for a requested tile height.
 
uint32_t TIFFDefaultStripSize (TIFF *tif, uint32_t request)
 Ask the installed sizing method for a RowsPerStrip recommendation.
 
void TIFFDefaultTileSize (TIFF *tif, uint32_t *tw, uint32_t *th)
 Ask the installed sizing method to adjust tile width and height.
 
int TIFFFileno (TIFF *tif)
 Return the handle's file-descriptor metadata.
 
int TIFFSetFileno (TIFF *tif, int fd)
 Replace descriptor metadata without changing client I/O routing.
 
thandle_t TIFFClientdata (TIFF *tif)
 Return the context passed to client I/O callbacks.
 
thandle_t TIFFSetClientdata (TIFF *tif, thandle_t newvalue)
 Replace the context passed to all client I/O callbacks.
 
int TIFFGetMode (TIFF *tif)
 Return the stored library access mode.
 
int TIFFSetMode (TIFF *tif, int mode)
 Replace the stored library access mode without reopening the resource.
 
int TIFFIsTiled (TIFF *tif)
 Test whether the current image uses tiles.
 
int TIFFIsByteSwapped (TIFF *tif)
 Test whether file values require byte swapping for this host.
 
int TIFFIsUpSampled (TIFF *tif)
 Test whether the active codec supplies upsampled data.
 
int TIFFIsMSB2LSB (TIFF *tif)
 Test the selected data bit-fill-order flag.
 
int TIFFIsBigEndian (TIFF *tif)
 Test whether the stored file signature is TIFF_BIGENDIAN.
 
int TIFFIsBigTIFF (TIFF *tif)
 Test whether the handle uses the BigTIFF format.
 
TIFFReadWriteProc TIFFGetReadProc (TIFF *tif)
 Return the installed client read callback.
 
TIFFReadWriteProc TIFFGetWriteProc (TIFF *tif)
 Return the installed client write callback.
 
TIFFSeekProc TIFFGetSeekProc (TIFF *tif)
 Return the installed client seek callback.
 
TIFFCloseProc TIFFGetCloseProc (TIFF *tif)
 Return the installed client close callback.
 
TIFFSizeProc TIFFGetSizeProc (TIFF *tif)
 Return the installed client file-size callback.
 
TIFFMapFileProc TIFFGetMapFileProc (TIFF *tif)
 Return the installed client mapping callback.
 
TIFFUnmapFileProc TIFFGetUnmapFileProc (TIFF *tif)
 Return the installed client unmapping callback.
 
uint32_t TIFFCurrentRow (TIFF *tif)
 Read the cached current scanline index.
 
tdir_t TIFFCurrentDirectory (TIFF *tif)
 Read the cached index of the current directory.
 
tdir_t TIFFNumberOfDirectories (TIFF *tif)
 Count reachable main-chain directories from the cached file header.
 
uint64_t TIFFCurrentDirOffset (TIFF *tif)
 Read the cached file offset of the current directory.
 
uint32_t TIFFCurrentStrip (TIFF *tif)
 Read the cached current strip index.
 
uint32_t TIFFCurrentTile (TIFF *tif)
 Read the cached current tile index.
 
int TIFFReadBufferSetup (TIFF *tif, void *bp, tmsize_t size)
 Replace the handle's raw reading buffer.
 
int TIFFWriteBufferSetup (TIFF *tif, void *bp, tmsize_t size)
 Replace the handle's encoding buffer.
 
int TIFFSetupStrips (TIFF *tif)
 Replace strile offset/count arrays from current geometry.
 
int TIFFWriteCheck (TIFF *tif, int tiles, const char *module)
 Validate and prepare geometry for image writing.
 
void TIFFFreeDirectory (TIFF *tif)
 Release the current directory's owned values and codec state.
 
int TIFFCreateDirectory (TIFF *tif)
 Replace current values with a fresh in-memory image directory.
 
int TIFFCreateCustomDirectory (TIFF *tif, const TIFFFieldArray *infoarray)
 Replace current values with a fresh custom metadata directory.
 
int TIFFCreateEXIFDirectory (TIFF *tif)
 Create a fresh in-memory EXIF metadata directory.
 
int TIFFCreateGPSDirectory (TIFF *tif)
 Create a fresh in-memory EXIF GPS metadata directory.
 
int TIFFLastDirectory (TIFF *tif)
 Test whether the cached next-directory link is zero.
 
int TIFFSetDirectory (TIFF *tif, tdir_t dirn)
 Select and read an image directory by its main-chain index.
 
int TIFFSetSubDirectory (TIFF *tif, uint64_t diroff)
 Select and read an image directory at a file offset.
 
int TIFFUnlinkDirectory (TIFF *tif, tdir_t dirn)
 Remove an image directory from the on-file main chain.
 
int TIFFSetField (TIFF *tif, uint32_t tag,...)
 Set a tag value in the current in-memory directory.
 
int TIFFVSetField (TIFF *tif, uint32_t tag, va_list ap)
 Set a tag value in the current in-memory directory.
 
int TIFFUnsetField (TIFF *tif, uint32_t tag)
 Clear tag presence or remove a stored custom value.
 
int TIFFWriteDirectory (TIFF *tif)
 Finish the current image directory and prepare a fresh one.
 
int TIFFWriteCustomDirectory (TIFF *tif, uint64_t *pdiroff)
 Write current custom values and return their IFD offset.
 
int TIFFCheckpointDirectory (TIFF *tif)
 Write the current image directory while retaining its values.
 
int TIFFRewriteDirectory (TIFF *tif)
 Relocate the current image IFD and repair its main-chain link.
 
int TIFFDeferStrileArrayWriting (TIFF *tif)
 Reserve strile-array entries for deferred payload writing.
 
int TIFFForceStrileArrayWriting (TIFF *tif)
 Patch on-file strile offset and byte-count payloads.
 
void TIFFPrintDirectory (TIFF *tif, FILE *fd, long flags)
 Print a human-readable description of the current directory.
 
int TIFFReadScanline (TIFF *tif, void *buf, uint32_t row, uint16_t sample)
 Decode one image scanline into caller storage.
 
int TIFFWriteScanline (TIFF *tif, void *buf, uint32_t row, uint16_t sample)
 Encode and buffer one image scanline.
 
int TIFFReadRGBAImage (TIFF *tif, uint32_t rwidth, uint32_t rheight, uint32_t *raster, int stop)
 Read the current image into a packed RGBA raster.
 
int TIFFReadRGBAImageOriented (TIFF *tif, uint32_t rwidth, uint32_t rheight, uint32_t *raster, int orientation, int stop)
 Read the current image into a packed RGBA raster.
 
int TIFFReadRGBAStrip (TIFF *tif, uint32_t row, uint32_t *raster)
 Read and convert one whole strip to packed RGBA.
 
int TIFFReadRGBATile (TIFF *tif, uint32_t col, uint32_t row, uint32_t *raster)
 Read and convert one whole tile to packed RGBA.
 
int TIFFReadRGBAStripExt (TIFF *tif, uint32_t row, uint32_t *raster, int stop_on_error)
 Read and convert one whole strip to packed RGBA.
 
int TIFFReadRGBATileExt (TIFF *tif, uint32_t col, uint32_t row, uint32_t *raster, int stop_on_error)
 Read and convert one whole tile to packed RGBA.
 
int TIFFRGBAImageOK (TIFF *tif, char emsg[1024])
 Check preliminary RGBA compatibility of the current directory.
 
int TIFFRGBAImageBegin (TIFFRGBAImage *img, TIFF *tif, int stop, char emsg[1024])
 Initialise an RGBA reader and select conversion methods.
 
int TIFFRGBAImageGet (TIFFRGBAImage *img, uint32_t *raster, uint32_t rwidth, uint32_t rheight)
 Read and convert a selected image area through installed callbacks.
 
void TIFFRGBAImageEnd (TIFFRGBAImage *img)
 Release RGBA conversion tables and copied colormaps.
 
const char * TIFFFileName (TIFF *tif)
 Return the handle's diagnostic filename.
 
const char * TIFFSetFileName (TIFF *tif, const char *name)
 Replace the diagnostic filename pointer without copying it.
 
void TIFFError (const char *module, const char *fmt,...)
 Dispatch a error diagnostic to the configured handlers.
 
void TIFFErrorExt (thandle_t fd, const char *module, const char *fmt,...)
 Dispatch a error diagnostic to the configured handlers.
 
void TIFFWarning (const char *module, const char *fmt,...)
 Dispatch a warning diagnostic to the configured handlers.
 
void TIFFWarningExt (thandle_t fd, const char *module, const char *fmt,...)
 Dispatch a warning diagnostic to the configured handlers.
 
TIFFErrorHandler TIFFSetErrorHandler (TIFFErrorHandler handler)
 Replace the library-wide error handler.
 
TIFFErrorHandlerExt TIFFSetErrorHandlerExt (TIFFErrorHandlerExt handler)
 Replace the library-wide error extended handler.
 
TIFFErrorHandler TIFFSetWarningHandler (TIFFErrorHandler handler)
 Replace the library-wide warning handler.
 
TIFFErrorHandlerExt TIFFSetWarningHandlerExt (TIFFErrorHandlerExt handler)
 Replace the library-wide warning extended handler.
 
void TIFFWarningExtR (TIFF *tif, const char *module, const char *fmt,...)
 Dispatch a warning diagnostic to the configured handlers.
 
void TIFFErrorExtR (TIFF *tif, const char *module, const char *fmt,...)
 Dispatch a error diagnostic to the configured handlers.
 
TIFFOpenOptions * TIFFOpenOptionsAlloc (void)
 Allocate default options for opening a TIFF handle.
 
void TIFFOpenOptionsFree (TIFFOpenOptions *opts)
 Release an open-options object.
 
void TIFFOpenOptionsSetMaxSingleMemAlloc (TIFFOpenOptions *opts, tmsize_t max_single_mem_alloc)
 Set the single checked allocation limit for subsequent opens.
 
void TIFFOpenOptionsSetMaxCumulatedMemAlloc (TIFFOpenOptions *opts, tmsize_t max_cumulated_mem_alloc)
 Set the cumulative checked allocation limit for subsequent opens.
 
void TIFFOpenOptionsSetWarnAboutUnknownTags (TIFFOpenOptions *opts, int warn_about_unknown_tags)
 Select whether subsequent opens warn about unknown tags.
 
void TIFFOpenOptionsSetErrorHandlerExtR (TIFFOpenOptions *opts, TIFFErrorHandlerExtR handler, void *errorhandler_user_data)
 Set the per-handle error callback for subsequent opens.
 
void TIFFOpenOptionsSetWarningHandlerExtR (TIFFOpenOptions *opts, TIFFErrorHandlerExtR handler, void *warnhandler_user_data)
 Set the per-handle warning callback for subsequent opens.
 
TIFF * TIFFOpen (const char *name, const char *mode)
 Open a TIFF file by pathname.
 
TIFF * TIFFOpenExt (const char *name, const char *mode, TIFFOpenOptions *opts)
 Open a TIFF file by pathname.
 
TIFF * TIFFFdOpen (int fd, const char *name, const char *mode)
 Attach a TIFF handle to an already-open platform resource.
 
TIFF * TIFFFdOpenExt (int fd, const char *name, const char *mode, TIFFOpenOptions *opts)
 Attach a TIFF handle to an already-open platform resource.
 
TIFF * TIFFClientOpen (const char *name, const char *mode, thandle_t clientdata, TIFFReadWriteProc readproc, TIFFReadWriteProc writeproc, TIFFSeekProc seekproc, TIFFCloseProc closeproc, TIFFSizeProc sizeproc, TIFFMapFileProc mapproc, TIFFUnmapFileProc unmapproc)
 Initialise a TIFF handle using client-supplied I/O callbacks.
 
TIFF * TIFFClientOpenExt (const char *name, const char *mode, thandle_t clientdata, TIFFReadWriteProc readproc, TIFFReadWriteProc writeproc, TIFFSeekProc seekproc, TIFFCloseProc closeproc, TIFFSizeProc sizeproc, TIFFMapFileProc mapproc, TIFFUnmapFileProc unmapproc, TIFFOpenOptions *opts)
 Initialise a TIFF handle using client-supplied I/O callbacks.
 
TIFFExtendProc TIFFSetTagExtender (TIFFExtendProc extender)
 Replace the process-wide image-directory extension callback.
 
uint32_t TIFFComputeTile (TIFF *tif, uint32_t x, uint32_t y, uint32_t z, uint16_t s)
 Compute a tile index from pixel and sample coordinates.
 
int TIFFCheckTile (TIFF *tif, uint32_t x, uint32_t y, uint32_t z, uint16_t s)
 Check pixel and separate-sample coordinates against image bounds.
 
uint32_t TIFFNumberOfTiles (TIFF *tif)
 Compute the tile count across image depth and sample planes.
 
tmsize_t TIFFReadTile (TIFF *tif, void *buf, uint32_t x, uint32_t y, uint32_t z, uint16_t s)
 Decode the tile containing image coordinates.
 
tmsize_t TIFFWriteTile (TIFF *tif, void *buf, uint32_t x, uint32_t y, uint32_t z, uint16_t s)
 Encode the tile containing image coordinates.
 
uint32_t TIFFComputeStrip (TIFF *tif, uint32_t row, uint16_t sample)
 Compute a strip index from a row and optional sample plane.
 
uint32_t TIFFNumberOfStrips (TIFF *tif)
 Compute the strip count from current image geometry.
 
tmsize_t TIFFReadEncodedStrip (TIFF *tif, uint32_t strip, void *buf, tmsize_t size)
 Read decoded samples from one strip.
 
tmsize_t TIFFReadRawStrip (TIFF *tif, uint32_t strip, void *buf, tmsize_t size)
 Read stored bytes from one strip.
 
tmsize_t TIFFReadEncodedTile (TIFF *tif, uint32_t tile, void *buf, tmsize_t size)
 Read decoded samples from one tile.
 
tmsize_t TIFFReadRawTile (TIFF *tif, uint32_t tile, void *buf, tmsize_t size)
 Read stored bytes from one tile.
 
int TIFFReadFromUserBuffer (TIFF *tif, uint32_t strile, void *inbuf, tmsize_t insize, void *outbuf, tmsize_t outsize)
 Decode one strile from caller-provided stored bytes.
 
tmsize_t TIFFWriteEncodedStrip (TIFF *tif, uint32_t strip, void *data, tmsize_t cc)
 Write encoded samples to one strip.
 
tmsize_t TIFFWriteRawStrip (TIFF *tif, uint32_t strip, void *data, tmsize_t cc)
 Write raw stored bytes to one strip.
 
tmsize_t TIFFWriteEncodedTile (TIFF *tif, uint32_t tile, void *data, tmsize_t cc)
 Write encoded samples to one tile.
 
tmsize_t TIFFWriteRawTile (TIFF *tif, uint32_t tile, void *data, tmsize_t cc)
 Write raw stored bytes to one tile.
 
uint64_t TIFFGetMaxCompressionRatio (TIFF *tif)
 Query the codec's allocation-recovery compression-ratio heuristic.
 
int TIFFDataWidth (TIFFDataType type)
 Report the on-disk byte width of a TIFF data type.
 
void TIFFSetWriteOffset (TIFF *tif, toff_t off)
 Change the cached next payload write offset.
 
void TIFFSwabShort (uint16_t *wp)
 Reverse the byte order of one value.
 
void TIFFSwabLong (uint32_t *lp)
 Reverse the byte order of one value.
 
void TIFFSwabLong8 (uint64_t *lp)
 Reverse the byte order of one value.
 
void TIFFSwabFloat (float *fp)
 Reverse the byte order of one value.
 
void TIFFSwabDouble (double *dp)
 Reverse the byte order of one value.
 
void TIFFSwabArrayOfShort (uint16_t *wp, tmsize_t n)
 Reverse the byte order of each array element.
 
void TIFFSwabArrayOfTriples (uint8_t *tp, tmsize_t n)
 Reverse the byte order of each array element.
 
void TIFFSwabArrayOfLong (uint32_t *lp, tmsize_t n)
 Reverse the byte order of each array element.
 
void TIFFSwabArrayOfLong8 (uint64_t *lp, tmsize_t n)
 Reverse the byte order of each array element.
 
void TIFFSwabArrayOfFloat (float *fp, tmsize_t n)
 Reverse the byte order of each array element.
 
void TIFFSwabArrayOfDouble (double *dp, tmsize_t n)
 Reverse the byte order of each array element.
 
void TIFFReverseBits (uint8_t *cp, tmsize_t n)
 Reverse the bit order within each byte of a buffer.
 
const unsigned char * TIFFGetBitRevTable (int reversed)
 Select the immutable byte reversal or identity lookup table.
 
uint64_t TIFFGetStrileOffset (TIFF *tif, uint32_t strile)
 Query one logical strile file offset.
 
uint64_t TIFFGetStrileByteCount (TIFF *tif, uint32_t strile)
 Query one logical strile byte count.
 
uint64_t TIFFGetStrileOffsetWithErr (TIFF *tif, uint32_t strile, int *pbErr)
 Query one logical strile file offset.
 
uint64_t TIFFGetStrileByteCountWithErr (TIFF *tif, uint32_t strile, int *pbErr)
 Query one logical strile byte count.
 
double LogL16toY (int p16)
 Decode 16-bit logarithmic luminance to a linear value.
 
double LogL10toY (int p10)
 Decode 10-bit logarithmic luminance to a linear value.
 
void XYZtoRGB24 (float *xyz, uint8_t *rgb)
 Convert a linear XYZ triplet to display RGB bytes.
 
int uv_decode (double *up, double *vp, int c)
 Decode a quantised chromaticity index to a bin-centre pair.
 
void LogLuv24toXYZ (uint32_t p, float *XYZ)
 Decode one packed 24-bit LogLuv pixel to linear XYZ.
 
void LogLuv32toXYZ (uint32_t p, float *XYZ)
 Decode one packed 32-bit LogLuv pixel to linear XYZ.
 
int LogL16fromY (double Y, int em)
 Encode linear luminance as a 16-bit logarithmic value.
 
int LogL10fromY (double Y, int em)
 Encode linear luminance as a 10-bit logarithmic value.
 
int uv_encode (double u, double v, int em)
 Encode chromaticity using the irregular LogLuv quantisation table.
 
uint32_t LogLuv24fromXYZ (float *XYZ, int em)
 Encode linear XYZ as one packed 24-bit LogLuv pixel.
 
uint32_t LogLuv32fromXYZ (float *XYZ, int em)
 Encode linear XYZ as one packed 32-bit LogLuv pixel.
 
int TIFFCIELabToRGBInit (TIFFCIELabToRGB *cielab, const TIFFDisplay *display, float *refWhite)
 Initialise caller-owned CIE Lab conversion tables and reference white.
 
void TIFFCIELabToXYZ (TIFFCIELabToRGB *cielab, uint32_t l, int32_t a, int32_t b, float *X, float *Y, float *Z)
 Convert 8-bit TIFF CIE L*a*b* samples to XYZ.
 
void TIFFXYZToRGB (TIFFCIELabToRGB *cielab, float X, float Y, float Z, uint32_t *r, uint32_t *g, uint32_t *b)
 Convert XYZ tristimulus values to display RGB channels.
 
int TIFFYCbCrToRGBInit (TIFFYCbCrToRGB *ycbcr, float *luma, float *refBlackWhite)
 Initialise caller-allocated 8-bit YCbCr conversion tables.
 
void TIFFYCbCrtoRGB (TIFFYCbCrToRGB *ycbcr, uint32_t Y, int32_t Cb, int32_t Cr, uint32_t *r, uint32_t *g, uint32_t *b)
 Convert an 8-bit YCbCr sample triplet to clipped RGB.
 
int TIFFMergeFieldInfo (TIFF *tif, const TIFFFieldInfo info[], uint32_t n)
 Register legacy application field definitions on a handle.
 

Detailed Description

Declare the public C library interface and its supporting types.

Definition in file tiffio.h.