LibTIFF 4.7.2
TIFF library public API and implementation reference
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs
Public data structures and constants

Describe supporting data layouts, flags, and packed-pixel accessors. More...

Collaboration diagram for Public data structures and constants:

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 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.
 

Typedefs

typedef unsigned char TIFFRGBValue
 Represent an 8-bit RGB channel value.
 
typedef struct _TIFFRGBAImage TIFFRGBAImage
 Name the RGBA reader state type.
 
typedef struct _TIFFField TIFFField
 Refer to an opaque registered field descriptor.
 
typedef struct _TIFFFieldArray TIFFFieldArray
 Refer to an opaque collection of field descriptors.
 
typedef struct TIFFOpenOptions TIFFOpenOptions
 Refer to opaque settings used when opening a TIFF handle.
 

Detailed Description

Describe supporting data layouts, flags, and packed-pixel accessors.

Structures are documented here as data representations. Callable callback contracts and the operations that initialise and consume each structure are documented with their owning modules.

Macro Definition Documentation

◆ CIELABTORGB_TABLE_RANGE

#define CIELABTORGB_TABLE_RANGE   1500

Define the largest CIE L*a*b*-to-RGB lookup-table index.

Each conversion array holds this many intervals plus one endpoint.

Definition at line 370 of file tiffio.h.

◆ D50_X0

#define D50_X0   (96.4250f)

Define the D50 reference-white X coordinate, scaled to Y = 100.

Definition at line 259 of file tiffio.h.

◆ D50_Y0

#define D50_Y0   (100.0f)

Define the D50 reference-white Y coordinate (100).

Definition at line 264 of file tiffio.h.

◆ D50_Z0

#define D50_Z0   (82.4680f)

Define the D50 reference-white Z coordinate, scaled to Y = 100.

Definition at line 269 of file tiffio.h.

◆ D65_X0

#define D65_X0   (95.0470f)

Define the D65 reference-white X coordinate, scaled to Y = 100.

Definition at line 243 of file tiffio.h.

◆ D65_Y0

#define D65_Y0   (100.0f)

Define the D65 reference-white Y coordinate (100).

Definition at line 248 of file tiffio.h.

◆ D65_Z0

#define D65_Z0   (108.8827f)

Define the D65 reference-white Z coordinate, scaled to Y = 100.

Definition at line 253 of file tiffio.h.

◆ FIELD_CUSTOM

#define FIELD_CUSTOM   65

Identify a field stored through the custom-metadata mechanism.

Definition at line 1316 of file tiffio.h.

◆ LOGLUV_PUBLIC

#define LOGLUV_PUBLIC   1

Control declaration of shared LogLuv conversion functions.

Defaults to 1 unless overridden before inclusion. This controls header visibility; it is not a runtime codec-capability query.

Definition at line 748 of file tiffio.h.

◆ TIFF_ANY

#define TIFF_ANY   TIFF_NOTYPE /* for field descriptor searching */

Match any data type when searching for a field descriptor.

Definition at line 1289 of file tiffio.h.

◆ TIFF_ATTRIBUTE

#define TIFF_ATTRIBUTE (   x)    /*nothing*/

Expand a compiler attribute in a public declaration when supported.

This is declaration markup, not a runtime operation. It neither evaluates expressions nor allocates or transfers storage.

Parameters
[in]xGNU attribute argument tokens, including their parentheses.
Returns
The compiler attribute syntax, or no tokens on other compilers.

Definition at line 764 of file tiffio.h.

◆ TIFF_SPP

#define TIFF_SPP   -2 /* marker for SamplesPerPixel tags */

Mark a field whose count follows SamplesPerPixel.

Definition at line 1302 of file tiffio.h.

◆ TIFF_VARIABLE

#define TIFF_VARIABLE   -1 /* marker for variable length tags */

Mark a variable-length field with a 16-bit count convention.

For pass-count fields, the variadic API uses a 16-bit count. The field access contract determines whether a count is passed at all.

Definition at line 1297 of file tiffio.h.

◆ TIFF_VARIABLE2

#define TIFF_VARIABLE2   -3 /* marker for uint32_t var-length tags */

Mark a variable-length field with a 32-bit count convention.

For pass-count fields, the variadic API uses a 32-bit count. The field access contract determines whether a count is passed at all.

Definition at line 1310 of file tiffio.h.

◆ TIFFGetA

#define TIFFGetA (   abgr)    (((abgr) >> 24) & 0xff)

Extract the alpha byte from a packed ABGR pixel value.

Operates on the numeric pixel value, independently of its byte layout in memory. The argument is evaluated once; the macro performs no allocation, I/O, or library-state changes and has no failure result.

Parameters
[in]abgrUnsigned 32-bit packed pixel, as returned by the RGBA reader.
Returns
The alpha channel in the range 0 through 255.

Definition at line 670 of file tiffio.h.

◆ TIFFGetB

#define TIFFGetB (   abgr)    (((abgr) >> 16) & 0xff)

Extract the blue byte from a packed ABGR pixel value.

Operates on the numeric pixel value, independently of its byte layout in memory. The argument is evaluated once; the macro performs no allocation, I/O, or library-state changes and has no failure result.

Parameters
[in]abgrUnsigned 32-bit packed pixel, as returned by the RGBA reader.
Returns
The blue channel in the range 0 through 255.

Definition at line 658 of file tiffio.h.

◆ TIFFGetG

#define TIFFGetG (   abgr)    (((abgr) >> 8) & 0xff)

Extract the green byte from a packed ABGR pixel value.

Operates on the numeric pixel value, independently of its byte layout in memory. The argument is evaluated once; the macro performs no allocation, I/O, or library-state changes and has no failure result.

Parameters
[in]abgrUnsigned 32-bit packed pixel, as returned by the RGBA reader.
Returns
The green channel in the range 0 through 255.

Definition at line 646 of file tiffio.h.

◆ TIFFGetR

#define TIFFGetR (   abgr)    ((abgr) & 0xff)

Extract the red byte from a packed ABGR pixel value.

Operates on the numeric pixel value, independently of its byte layout in memory. The argument is evaluated once; the macro performs no allocation, I/O, or library-state changes and has no failure result.

Parameters
[in]abgrUnsigned 32-bit packed pixel, as returned by the RGBA reader.
Returns
The red channel in the range 0 through 255.

Definition at line 634 of file tiffio.h.

◆ TIFFPRINT_COLORMAP

#define TIFFPRINT_COLORMAP   0x4 /* colormap */

Include palette entries in directory printing.

Expands a present three-plane palette to as many rows as it was set with (2^BitsPerSample at that time, or fewer after BitsPerSample is narrowed); very large output remains possible. See Directory printing.

Definition at line 209 of file tiffio.h.

◆ TIFFPRINT_CURVES

#define TIFFPRINT_CURVES   0x2 /* color/gray response curves */

Include transfer-function curves in directory printing.

Expands present transfer functions to as many rows as they were set with (2^BitsPerSample at that time), with up to three colour columns. It is not a validation flag. See Directory printing.

Definition at line 199 of file tiffio.h.

◆ TIFFPRINT_JPEGACTABLES

#define TIFFPRINT_JPEGACTABLES   0x200 /* JPEG AC tables */

Retain the legacy JPEG AC-table print flag.

Shares its value with TIFFPRINT_JPEGDCTABLES. The default directory printer does not inspect this legacy bit.

Definition at line 224 of file tiffio.h.

◆ TIFFPRINT_JPEGDCTABLES

#define TIFFPRINT_JPEGDCTABLES   0x200 /* JPEG DC tables */

Retain the legacy JPEG DC-table print flag.

Shares its value with TIFFPRINT_JPEGACTABLES. The default directory printer does not inspect this legacy bit.

Definition at line 232 of file tiffio.h.

◆ TIFFPRINT_JPEGQTABLES

#define TIFFPRINT_JPEGQTABLES   0x100 /* JPEG Q matrices */

Retain the legacy JPEG quantisation-table print flag.

The default directory printer does not inspect this legacy bit.

Definition at line 216 of file tiffio.h.

◆ TIFFPRINT_NONE

#define TIFFPRINT_NONE   0x0 /* no extra info */

Request no optional large-data expansions in TIFFPrintDirectory().

Zero disables optional core table expansions, not custom arrays, raw XML, or callback output; it is not a total output-size limit. See Directory printing.

Definition at line 180 of file tiffio.h.

◆ TIFFPRINT_STRIPS

#define TIFFPRINT_STRIPS   0x1 /* strips/tiles info */

Include strip/tile offsets and byte counts in directory printing.

Includes every logical strile when offsets are marked present. Accessors may load deferred metadata, allocate, and change I/O/cache state; failed queries can print zero without separate status. See Directory printing.

Definition at line 190 of file tiffio.h.

Typedef Documentation

◆ TIFFField

typedef struct _TIFFField TIFFField

Refer to an opaque registered field descriptor.

Descriptor ownership and validity follow the field lookup/registration API.

Definition at line 1325 of file tiffio.h.

◆ TIFFFieldArray

Refer to an opaque collection of field descriptors.

The directory module owns the definition and specifies registration lifetime.

Definition at line 1333 of file tiffio.h.

◆ TIFFOpenOptions

Refer to opaque settings used when opening a TIFF handle.

Allocate and release through the open-options API; callback contexts remain client-owned and must outlive their use by the resulting handle.

Definition at line 3956 of file tiffio.h.

◆ TIFFRGBAImage

typedef struct _TIFFRGBAImage TIFFRGBAImage

Name the RGBA reader state type.

Definition at line 407 of file tiffio.h.

◆ TIFFRGBValue

typedef unsigned char TIFFRGBValue

Represent an 8-bit RGB channel value.

Definition at line 276 of file tiffio.h.