LibTIFF 4.7.2
TIFF library public API and implementation reference
Loading...
Searching...
No Matches
Data Fields
_TIFFRGBAImage Struct Reference

Hold the state and selected callbacks for an RGBA image reader. More...

#include <tiffio.h>

Collaboration diagram for _TIFFRGBAImage:
[legend]

Data Fields

TIFF * tif
 Borrowed TIFF handle; must outlive this reader state.
 
int stoponerr
 Nonzero to stop reading when an error is encountered.
 
int isContig
 Nonzero for contiguous samples; zero for separate sample planes.
 
int alpha
 ExtraSamples alpha interpretation, or zero when none is selected.
 
uint32_t width
 Source image width in pixels.
 
uint32_t height
 Source image height in pixels.
 
uint16_t bitspersample
 Source bits per sample.
 
uint16_t samplesperpixel
 Source samples per pixel.
 
uint16_t orientation
 Source Orientation tag value.
 
uint16_t req_orientation
 Requested output raster orientation.
 
uint16_t photometric
 Source PhotometricInterpretation tag value.
 
uint16_t * redcmap
 Reader-owned red palette copy, or NULL.
 
uint16_t * greencmap
 Reader-owned green palette copy, or NULL.
 
uint16_t * bluecmap
 Reader-owned blue palette copy, or NULL.
 
int(* get )(TIFFRGBAImage *img, uint32_t *raster, uint32_t rwidth, uint32_t rheight)
 Read and pack a raster through the selected RGBA state.
 
union { 
 
   void(*   any )(TIFFRGBAImage *img) 
 Reserve a generic storage view of the selected packer. More...
 
   tileContigRoutine   contig 
 Put callback for contiguous source samples. More...
 
   tileSeparateRoutine   separate 
 Put callback for separate source planes. More...
 
} put 
 Select the RGBA packer signature matching the image organisation.
 
TIFFRGBValue * Map
 Reader-owned sample mapping table, or NULL.
 
uint32_t ** BWmap
 Reader-owned black/white expansion tables, or NULL.
 
uint32_t ** PALmap
 Reader-owned palette expansion tables, or NULL.
 
TIFFYCbCrToRGB * ycbcr
 Reader-owned YCbCr conversion block, or NULL.
 
TIFFCIELabToRGB * cielab
 Reader-owned CIE L*a*b* conversion state, or NULL.
 
uint8_t * UaToAa
 Reader-owned unassociated-to-associated alpha lookup table, or NULL.
 
uint8_t * Bitdepth16To8
 Reader-owned 16-bit-to-8-bit sample lookup table, or NULL.
 
int row_offset
 Nonnegative starting source row, measured in pixels.
 
int col_offset
 Nonnegative starting source column, measured in pixels.
 

Detailed Description

Hold the state and selected callbacks for an RGBA image reader.

For state successfully initialised by TIFFRGBAImageBegin(), release owned conversion tables with TIFFRGBAImageEnd(). It does not close the borrowed TIFF handle, free the caller's state structure, or free the output raster. Do not release the member pointers individually. They are invalid after End. Callback calling conventions and supported conversions belong to the RGBA module; this description records the data layout and ownership.

Definition at line 516 of file tiffio.h.

Field Documentation

◆ alpha

int _TIFFRGBAImage::alpha

ExtraSamples alpha interpretation, or zero when none is selected.

Definition at line 529 of file tiffio.h.

Referenced by gtStripSeparate(), gtTileSeparate(), PickContigCase(), PickSeparateCase(), and TIFFRGBAImageBegin().

◆ any

void(* _TIFFRGBAImage::any) (TIFFRGBAImage *img)

Reserve a generic storage view of the selected packer.

This signature is not callable: dispatch through contig or separate according to isContig and keep the selected callback code live. No invocation, error, side-effect or ownership contract exists for this storage-only view.

Parameters
[in,out]imgNominal reader argument; no valid call is allowed.

Definition at line 587 of file tiffio.h.

Referenced by TIFFRGBAImageGet().

◆ Bitdepth16To8

uint8_t* _TIFFRGBAImage::Bitdepth16To8

Reader-owned 16-bit-to-8-bit sample lookup table, or NULL.

Definition at line 611 of file tiffio.h.

Referenced by BuildMapBitdepth16To8(), TIFFRGBAImageBegin(), and TIFFRGBAImageEnd().

◆ bitspersample

uint16_t _TIFFRGBAImage::bitspersample

◆ bluecmap

uint16_t* _TIFFRGBAImage::bluecmap

Reader-owned blue palette copy, or NULL.

Definition at line 549 of file tiffio.h.

Referenced by checkcmap(), cvtcmap(), makecmap(), TIFFRGBAImageBegin(), and TIFFRGBAImageEnd().

◆ BWmap

uint32_t** _TIFFRGBAImage::BWmap

Reader-owned black/white expansion tables, or NULL.

Definition at line 597 of file tiffio.h.

Referenced by makebwmap(), TIFFRGBAImageBegin(), and TIFFRGBAImageEnd().

◆ cielab

TIFFCIELabToRGB* _TIFFRGBAImage::cielab

Reader-owned CIE L*a*b* conversion state, or NULL.

Definition at line 603 of file tiffio.h.

Referenced by initCIELabConversion(), TIFFRGBAImageBegin(), and TIFFRGBAImageEnd().

◆ col_offset

int _TIFFRGBAImage::col_offset

◆ contig

tileContigRoutine _TIFFRGBAImage::contig

Put callback for contiguous source samples.

Definition at line 589 of file tiffio.h.

Referenced by gtStripContig(), gtTileContig(), and PickContigCase().

◆ get

int(* _TIFFRGBAImage::get) (TIFFRGBAImage *img, uint32_t *raster, uint32_t rwidth, uint32_t rheight)

Read and pack a raster through the selected RGBA state.

Called synchronously by TIFFRGBAImageGet(). Custom replacements must respect image offsets, caller capacity and their chosen output format. Default getters use the format/orientation/error-policy contracts in TIFFRGBAImageGet() and can allocate, perform I/O and invoke diagnostics. State and callback code must remain live; do not retain raster, close the handle or recursively decode it. Caller retains all argument ownership; failure may leave partial output and changed reader/handle state.

Parameters
[in,out]imgBorrowed successfully initialised RGBA reader state.
[out]rasterBorrowed writable rwidth*rheight-pixel destination; allocation product must be representable and disjoint from reader data.
[in]rwidthPositive destination row stride in pixels.
[in]rheightPositive destination height in rows.
Returns
One on completion, zero on failure; the default error policy can tolerate selected corrupt input and still report completion.

Definition at line 570 of file tiffio.h.

Referenced by PickContigCase(), PickSeparateCase(), and TIFFRGBAImageGet().

◆ greencmap

uint16_t* _TIFFRGBAImage::greencmap

Reader-owned green palette copy, or NULL.

Definition at line 547 of file tiffio.h.

Referenced by checkcmap(), cvtcmap(), makecmap(), TIFFRGBAImageBegin(), and TIFFRGBAImageEnd().

◆ height

uint32_t _TIFFRGBAImage::height

Source image height in pixels.

Definition at line 533 of file tiffio.h.

Referenced by calcCopyToRasterParameter(), PickContigCase(), TIFFReadRGBAStripExt(), TIFFReadRGBATileExt(), and TIFFRGBAImageBegin().

◆ isContig

int _TIFFRGBAImage::isContig

Nonzero for contiguous samples; zero for separate sample planes.

Definition at line 525 of file tiffio.h.

Referenced by TIFFRGBAImageBegin().

◆ Map

TIFFRGBValue* _TIFFRGBAImage::Map

Reader-owned sample mapping table, or NULL.

Definition at line 595 of file tiffio.h.

Referenced by makebwmap(), PickContigCase(), setupMap(), TIFFRGBAImageBegin(), and TIFFRGBAImageEnd().

◆ orientation

uint16_t _TIFFRGBAImage::orientation

Source Orientation tag value.

Definition at line 539 of file tiffio.h.

Referenced by setorientation(), and TIFFRGBAImageBegin().

◆ PALmap

uint32_t** _TIFFRGBAImage::PALmap

Reader-owned palette expansion tables, or NULL.

Definition at line 599 of file tiffio.h.

Referenced by makecmap(), TIFFRGBAImageBegin(), and TIFFRGBAImageEnd().

◆ photometric

uint16_t _TIFFRGBAImage::photometric

Source PhotometricInterpretation tag value.

Definition at line 543 of file tiffio.h.

Referenced by buildMap(), gtStripContig(), gtStripSeparate(), gtTileContig(), gtTileSeparate(), PickContigCase(), PickSeparateCase(), setupMap(), and TIFFRGBAImageBegin().

◆ [union]

union { ... } _TIFFRGBAImage::put

Select the RGBA packer signature matching the image organisation.

Selected put callback; use the member matching isContig.

Referenced by gtStripContig(), gtStripSeparate(), gtTileContig(), gtTileSeparate(), PickContigCase(), PickSeparateCase(), and TIFFRGBAImageGet().

◆ redcmap

uint16_t* _TIFFRGBAImage::redcmap

Reader-owned red palette copy, or NULL.

Definition at line 545 of file tiffio.h.

Referenced by checkcmap(), cvtcmap(), makecmap(), TIFFRGBAImageBegin(), and TIFFRGBAImageEnd().

◆ req_orientation

uint16_t _TIFFRGBAImage::req_orientation

Requested output raster orientation.

Definition at line 541 of file tiffio.h.

Referenced by calcCopyToRasterParameter(), setorientation(), TIFFReadRGBAImageOriented(), and TIFFRGBAImageBegin().

◆ row_offset

int _TIFFRGBAImage::row_offset

Nonnegative starting source row, measured in pixels.

Definition at line 614 of file tiffio.h.

Referenced by calcCopyToRasterParameter(), gtStripContig(), gtStripSeparate(), gtTileContig(), gtTileSeparate(), TIFFReadRGBAStripExt(), TIFFReadRGBATileExt(), and TIFFRGBAImageBegin().

◆ samplesperpixel

uint16_t _TIFFRGBAImage::samplesperpixel

Source samples per pixel.

Definition at line 537 of file tiffio.h.

Referenced by checkColOffsetByteAligned(), gtStripContig(), gtTileContig(), PickContigCase(), PickSeparateCase(), and TIFFRGBAImageBegin().

◆ separate

tileSeparateRoutine _TIFFRGBAImage::separate

Put callback for separate source planes.

Definition at line 591 of file tiffio.h.

Referenced by gtStripSeparate(), gtTileSeparate(), and PickSeparateCase().

◆ stoponerr

int _TIFFRGBAImage::stoponerr

Nonzero to stop reading when an error is encountered.

Definition at line 521 of file tiffio.h.

Referenced by gtStripContig(), gtStripSeparate(), gtTileContig(), gtTileSeparate(), and TIFFRGBAImageBegin().

◆ tif

TIFF* _TIFFRGBAImage::tif

◆ UaToAa

uint8_t* _TIFFRGBAImage::UaToAa

Reader-owned unassociated-to-associated alpha lookup table, or NULL.

Definition at line 609 of file tiffio.h.

Referenced by BuildMapUaToAa(), TIFFRGBAImageBegin(), and TIFFRGBAImageEnd().

◆ width

uint32_t _TIFFRGBAImage::width

◆ ycbcr

TIFFYCbCrToRGB* _TIFFRGBAImage::ycbcr

Reader-owned YCbCr conversion block, or NULL.

Definition at line 601 of file tiffio.h.

Referenced by initYCbCrConversion(), TIFFRGBAImageBegin(), and TIFFRGBAImageEnd().


The documentation for this struct was generated from the following file: