|
LibTIFF 4.7.2
TIFF library public API and implementation reference
|
Dispatch diagnostics and install library-wide handlers. More...
Typedefs | |
| 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. | |
Functions | |
| 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. | |
Dispatch diagnostics and install library-wide handlers.
| typedef void(* TIFFErrorHandler) (const char *module, const char *fmt, va_list ap) |
Handle a library-wide error or warning diagnostic.
Used for both error and warning callbacks. Invocation is synchronous and returns no status or suppression signal. Its return does not decide operation success. Do not retain borrowed strings/va_list or destroy the invoking handle from a callback. Callback code and any external context must remain valid until replaced and no invocation is in flight. Global handler replacement and concurrent use need external coordination; the library provides no registration lock. Exceptions from callbacks are not caught.
| [in] | module | Borrowed module name, possibly NULL. |
| [in] | fmt | Borrowed printf-style format string. |
| [in,out] | ap | Borrowed arguments valid during invocation; use va_copy() for a separate traversal. |
| typedef void(* TIFFErrorHandlerExt) (thandle_t fd, const char *module, const char *fmt, va_list ap) |
Handle a library-wide error or warning diagnostic.
Used for both error and warning callbacks. Invocation is synchronous and returns no status or suppression signal. Its return does not decide operation success. Do not retain borrowed strings/va_list or destroy the invoking handle from a callback. Callback code and any external context must remain valid until replaced and no invocation is in flight. Global handler replacement and concurrent use need external coordination; the library provides no registration lock. Exceptions from callbacks are not caught.
| [in] | fd | Opaque client context, possibly zero; borrowed for this call. |
| [in] | module | Borrowed module name, possibly NULL. |
| [in] | fmt | Borrowed printf-style format string. |
| [in,out] | ap | Borrowed arguments valid during invocation; use va_copy() for a separate traversal. |
|
extern |
Dispatch a error diagnostic to the configured handlers.
Invokes the ordinary global handler first and the extended global handler second, if installed. The extended handler receives zero, since this entry point has no client context. It does not dispatch a per-handle callback.
Returns no status, does not itself abort or change an operation's result, and owns none of the arguments. Default handlers write to stderr; user callbacks may have other effects, including changing errno. Each invoked handler receives a freshly started argument list. Formatting validity and callback lifetime are caller responsibilities; exceptions are not caught.
| [in] | module | Borrowed module name, possibly NULL. |
| [in] | fmt | Non-NULL printf-style format string. |
| [in] | ... | Arguments matching fmt and the default variadic promotions. |
Definition at line 51 of file tif_error.c.
References _TIFFerrorHandler, and _TIFFerrorHandlerExt.
|
extern |
Dispatch a error diagnostic to the configured handlers.
Invokes the ordinary global handler first and the extended global handler second, if installed. The extended handler receives fd. It does not dispatch a per-handle callback.
Returns no status, does not itself abort or change an operation's result, and owns none of the arguments. Default handlers write to stderr; user callbacks may have other effects, including changing errno. Each invoked handler receives a freshly started argument list. Formatting validity and callback lifetime are caller responsibilities; exceptions are not caught.
| [in] | fd | Opaque client context passed to the extended global handler. |
| [in] | module | Borrowed module name, possibly NULL. |
| [in] | fmt | Non-NULL printf-style format string. |
| [in] | ... | Arguments matching fmt and the default variadic promotions. |
Definition at line 68 of file tif_error.c.
References _TIFFerrorHandler, and _TIFFerrorHandlerExt.
Referenced by DoubleToRational(), DoubleToSrational(), TIFFRegisterCODEC(), and TIFFUnRegisterCODEC().
|
extern |
Dispatch a error diagnostic to the configured handlers.
First invokes the per-handle error callback when tif is non-NULL and that slot is installed. A nonzero result suppresses both global handlers for this message; otherwise the ordinary global handler and then the extended global handler run if installed. The latter receives tif's client context, or zero for a NULL tif.
Returns no status, does not itself abort or change an operation's result, and owns none of the arguments. Default handlers write to stderr; user callbacks may have other effects, including changing errno. Each invoked handler receives a freshly started argument list. Formatting validity and callback lifetime are caller responsibilities; exceptions are not caught.
| [in] | tif | Invoking live handle, or NULL to use only global handlers. |
| [in] | module | Borrowed module name, possibly NULL. |
| [in] | fmt | Non-NULL printf-style format string. |
| [in] | ... | Arguments matching fmt and the default variadic promotions. |
Definition at line 112 of file tif_error.c.
References _TIFFerrorHandler, _TIFFerrorHandlerExt, tiff::tif_clientdata, tiff::tif_errorhandler, and tiff::tif_errorhandler_user_data.
Referenced by _notConfigured(), _TIFFAdd64Ext(), _TIFFAddSSize(), _TIFFCastUInt64ToSSize(), _TIFFCastUInt64ToUInt32Ext(), _TIFFCheckDirNumberAndOffset(), _TIFFCheckPostDecodeLength(), _TIFFCheckRealloc(), _TIFFComputeTileExt(), _TIFFEmitErrorAboveMaxCumulatedMemAlloc(), _TIFFEmitErrorAboveMaxSingleMemAlloc(), _TIFFFetchStrileValue(), _TIFFGetStrileOffsetOrByteCountValue(), _TIFFMergeFields(), _TIFFMultiply32Ext(), _TIFFMultiply64(), _TIFFMultiplySSize(), _TIFFNoSeek(), _TIFFPartialReadStripArray(), _TIFFReadEncodedStripAndAllocBuffer(), _TIFFReadEncodedTileAndAllocBuffer(), _TIFFRemoveEntryFromDirectoryListByOffset(), _TIFFReserveLargeEnoughWriteBuffer(), _TIFFRewriteField(), _TIFFSetupFields(), _TIFFStrileSize64(), _TIFFVGetField(), _TIFFVSetField(), BuildMapBitdepth16To8(), BuildMapUaToAa(), calcCopyToRasterParameter(), checkColOffsetByteAligned(), countInkNamesString(), DecodeRowError(), DumpModeDecode(), DumpModeSeek(), EstimateStripByteCounts(), EvaluateIFDdatasizeReading(), fpAcc(), fpDiff(), GetLercDataType(), gtStripContig(), gtStripSeparate(), gtTileContig(), gtTileSeparate(), horAcc16(), horAcc32(), horAcc64(), horAcc8(), horDiff16(), horDiff32(), horDiff64(), horDiff8(), initCIELabConversion(), initYCbCrConversion(), insertOffsetAndDirNumber(), JBIGDecode(), JBIGEncode(), JBIGSetupDecode(), JBIGSetupEncode(), JPEGComputeStrileWidthHeightBytesPerLine(), JPEGDecodeRaw(), JPEGEncode(), JPEGEncodeRaw(), JPEGPreDecode(), JPEGPreEncode(), JPEGRawBytesPerClumpLine(), JPEGSetupDecode(), JPEGSetupEncode(), LERCDecode(), LERCEncode(), LERCPostEncode(), LERCPreDecode(), LERCVSetField(), LogL16Decode(), LogL16Encode(), LogL16InitState(), LogLuvDecode24(), LogLuvDecode32(), LogLuvDecodeStrip(), LogLuvDecodeTile(), LogLuvEncode24(), LogLuvEncode32(), LogLuvEncodeStrip(), LogLuvEncodeTile(), LogLuvFits(), LogLuvInitState(), LogLuvSetupDecode(), LogLuvSetupEncode(), LogLuvVSetField(), LZMADecode(), LZMAEncode(), LZMAPostEncode(), LZMAPreDecode(), LZMAPreEncode(), LZMAVSetField(), LZWDecode(), LZWDecodeCompat(), LZWPreDecode(), LZWPreEncode(), LZWSetupDecode(), LZWSetupEncode(), makebwmap(), makecmap(), MissingRequired(), NeXTDecode(), NeXTPreDecode(), OJPEGDecode(), OJPEGDecodeRaw(), OJPEGDecodeScanlines(), OJPEGEncode(), OJPEGLibjpegJpegErrorMgrErrorExit(), OJPEGLibjpegJpegSourceMgrFillInputBuffer(), OJPEGLibjpegJpegSourceMgrResyncToRestart(), OJPEGLibjpegJpegSourceMgrSkipInputData(), OJPEGPostEncode(), OJPEGPreDecodeSkipScanlines(), OJPEGPreEncode(), OJPEGReadHeaderInfo(), OJPEGReadHeaderInfoSec(), OJPEGReadHeaderInfoSecStreamDht(), OJPEGReadHeaderInfoSecStreamDqt(), OJPEGReadHeaderInfoSecStreamDri(), OJPEGReadHeaderInfoSecStreamSof(), OJPEGReadHeaderInfoSecStreamSos(), OJPEGReadHeaderInfoSecTablesAcTable(), OJPEGReadHeaderInfoSecTablesDcTable(), OJPEGReadHeaderInfoSecTablesQTable(), OJPEGSetupEncode(), OJPEGVSetField(), OJPEGWriteHeaderInfo(), OkToChangeTag(), PackBitsDecode(), PackBitsEncode(), PickContigCase(), PixarLogDecode(), PixarLogEncode(), PixarLogPostEncode(), PixarLogPreDecode(), PixarLogPreEncode(), PixarLogSetupDecode(), PixarLogSetupEncode(), PixarLogVSetField(), PredictorDecodeTile(), PredictorEncodeRow(), PredictorEncodeTile(), PredictorSetup(), setColorMap(), setTransferFunction(), SetupBuffers(), setupMap(), ThunderDecode(), ThunderDecodeRow(), ThunderSetupDecode(), TIFF_zalloc(), TIFFAdvanceDirectory(), TIFFAppendToStrip(), TIFFCheckRead(), TIFFCheckTile(), TIFFCleanup(), TIFFClientOpenExt(), TIFFComputeStrip(), TIFFCreateCustomDirectory(), TIFFDeferStrileArrayWriting(), TIFFFetchDirectory(), TIFFFetchNormalTag(), TIFFFillStrip(), TIFFFillStripPartial(), TIFFFillTile(), TIFFForceStrileArrayWriting(), TIFFGrowStrips(), TIFFInitJPEG(), TIFFInitLERC(), TIFFInitLZMA(), TIFFInitLZW(), TIFFInitOJPEG(), TIFFInitPixarLog(), TIFFInitSGILog(), TIFFInitWebP(), TIFFInitZIP(), TIFFInitZSTD(), TIFFjpeg_error_exit(), TIFFjpeg_progress_monitor(), TIFFjpeg_tables_dest(), TIFFLinkDirectory(), TIFFMergeFieldInfo(), TIFFNoDecode(), TIFFNoEncode(), TIFFPredictorInit(), TIFFRawStripSize(), TIFFRawStripSize64(), TIFFReadAndRealloc(), TIFFReadBufferSetup(), TIFFReadCustomDirectory(), TIFFReadDirectory(), TIFFReadDirEntryDataAndRealloc(), TIFFReadDirEntryOutputErr(), TIFFReadEncodedStrip(), TIFFReadEncodedStripGetStripSize(), TIFFReadEncodedTile(), TIFFReadFromUserBuffer(), TIFFReadRawStrip(), TIFFReadRawStrip1(), TIFFReadRawStripOrTile2(), TIFFReadRawTile(), TIFFReadRawTile1(), TIFFReadRGBAImageOriented(), TIFFReadRGBAStripExt(), TIFFReadRGBATileExt(), TIFFRewriteDirectorySec(), TIFFRGBAImageGet(), TIFFScanlineSize64(), TIFFSeek(), TIFFSetupStrips(), TIFFStartStrip(), TIFFStartTile(), TIFFTileRowSize64(), TIFFUnlinkDirectory(), TIFFVGetFieldDefaulted(), TIFFWriteBufferSetup(), TIFFWriteCheck(), TIFFWriteDirectorySec(), TIFFWriteDirectoryTagCheckedLong8Array(), TIFFWriteDirectoryTagCheckedRational(), TIFFWriteDirectoryTagCheckedRationalArray(), TIFFWriteDirectoryTagCheckedRationalDoubleArray(), TIFFWriteDirectoryTagCheckedShortArray(), TIFFWriteDirectoryTagCheckedSlong8Array(), TIFFWriteDirectoryTagCheckedSrationalArray(), TIFFWriteDirectoryTagCheckedSrationalDoubleArray(), TIFFWriteDirectoryTagCheckedSshortArray(), TIFFWriteDirectoryTagColormap(), TIFFWriteDirectoryTagData(), TIFFWriteDirectoryTagIfdIfd8Array(), TIFFWriteDirectoryTagLong8Array(), TIFFWriteDirectoryTagLongLong8Array(), TIFFWriteDirectoryTagSampleformatArray(), TIFFWriteDirectoryTagShortPerSample(), TIFFWriteDirectoryTagSlong8Array(), TIFFWriteDirectoryTagSubifd(), TIFFWriteDirectoryTagTransferfunction(), TIFFWriteEncodedStrip(), TIFFWriteEncodedTile(), TIFFWriteRawStrip(), TIFFWriteRawTile(), TIFFWriteScanline(), TWebPDatasetWriter(), TWebPDecode(), TWebPEncode(), TWebPFixupTags(), TWebPPostEncode(), TWebPPreDecode(), TWebPPreEncode(), TWebPSetupDecode(), TWebPSetupEncode(), TWebPVSetField(), ZIPDecode(), ZIPEncode(), ZIPPostEncode(), ZIPSetupDecode(), ZIPSetupEncode(), ZIPVSetField(), ZSTDDecode(), ZSTDEncode(), ZSTDPostEncode(), ZSTDPreDecode(), and ZSTDPreEncode().
|
extern |
Replace the library-wide error handler.
Changes one global callback pointer without allocating, retaining code/context, or emitting a diagnostic. Does not change the other global slot or per-handle callbacks. NULL suppresses only this slot, not every diagnostic path. Coordinate concurrent registration and in- flight calls externally; no locking or lifetime management is provided.
| [in] | handler | Replacement function pointer, or NULL to disable this handler slot. |
Definition at line 37 of file tif_error.c.
References _TIFFerrorHandler.
|
extern |
Replace the library-wide error extended handler.
Changes one global callback pointer without allocating, retaining code/context, or emitting a diagnostic. Does not change the other global slot or per-handle callbacks. NULL suppresses only this slot, not every diagnostic path. Coordinate concurrent registration and in- flight calls externally; no locking or lifetime management is provided.
| [in] | handler | Replacement function pointer, or NULL to disable this handler slot. |
Definition at line 44 of file tif_error.c.
References _TIFFerrorHandlerExt.
|
extern |
Replace the library-wide warning handler.
Changes one global callback pointer without allocating, retaining code/context, or emitting a diagnostic. Does not change the other global slot or per-handle callbacks. NULL suppresses only this slot, not every diagnostic path. Coordinate concurrent registration and in- flight calls externally; no locking or lifetime management is provided.
| [in] | handler | Replacement function pointer, or NULL to disable this handler slot. |
Definition at line 37 of file tif_warning.c.
References _TIFFwarningHandler.
|
extern |
Replace the library-wide warning extended handler.
Changes one global callback pointer without allocating, retaining code/context, or emitting a diagnostic. Does not change the other global slot or per-handle callbacks. NULL suppresses only this slot, not every diagnostic path. Coordinate concurrent registration and in- flight calls externally; no locking or lifetime management is provided.
| [in] | handler | Replacement function pointer, or NULL to disable this handler slot. |
Definition at line 44 of file tif_warning.c.
References _TIFFwarningHandlerExt.
|
extern |
Dispatch a warning diagnostic to the configured handlers.
Invokes the ordinary global handler first and the extended global handler second, if installed. The extended handler receives zero, since this entry point has no client context. It does not dispatch a per-handle callback.
Returns no status, does not itself abort or change an operation's result, and owns none of the arguments. Default handlers write to stderr; user callbacks may have other effects, including changing errno. Each invoked handler receives a freshly started argument list. Formatting validity and callback lifetime are caller responsibilities; exceptions are not caught.
| [in] | module | Borrowed module name, possibly NULL. |
| [in] | fmt | Non-NULL printf-style format string. |
| [in] | ... | Arguments matching fmt and the default variadic promotions. |
Definition at line 51 of file tif_warning.c.
References _TIFFwarningHandler, and _TIFFwarningHandlerExt.
|
extern |
Dispatch a warning diagnostic to the configured handlers.
Invokes the ordinary global handler first and the extended global handler second, if installed. The extended handler receives fd. It does not dispatch a per-handle callback.
Returns no status, does not itself abort or change an operation's result, and owns none of the arguments. Default handlers write to stderr; user callbacks may have other effects, including changing errno. Each invoked handler receives a freshly started argument list. Formatting validity and callback lifetime are caller responsibilities; exceptions are not caught.
| [in] | fd | Opaque client context passed to the extended global handler. |
| [in] | module | Borrowed module name, possibly NULL. |
| [in] | fmt | Non-NULL printf-style format string. |
| [in] | ... | Arguments matching fmt and the default variadic promotions. |
Definition at line 68 of file tif_warning.c.
References _TIFFwarningHandler, and _TIFFwarningHandlerExt.
|
extern |
Dispatch a warning diagnostic to the configured handlers.
First invokes the per-handle warning callback when tif is non-NULL and that slot is installed. A nonzero result suppresses both global handlers for this message; otherwise the ordinary global handler and then the extended global handler run if installed. The latter receives tif's client context, or zero for a NULL tif.
Returns no status, does not itself abort or change an operation's result, and owns none of the arguments. Default handlers write to stderr; user callbacks may have other effects, including changing errno. Each invoked handler receives a freshly started argument list. Formatting validity and callback lifetime are caller responsibilities; exceptions are not caught.
| [in] | tif | Invoking live handle, or NULL to use only global handlers. |
| [in] | module | Borrowed module name, possibly NULL. |
| [in] | fmt | Non-NULL printf-style format string. |
| [in] | ... | Arguments matching fmt and the default variadic promotions. |
Definition at line 85 of file tif_warning.c.
References _TIFFwarningHandler, _TIFFwarningHandlerExt, tiff::tif_clientdata, tiff::tif_warnhandler, and tiff::tif_warnhandler_user_data.
Referenced by _TIFFCheckDirNumberAndOffset(), _TIFFSwab16BitData(), _TIFFSwab24BitData(), _TIFFSwab32BitData(), _TIFFSwab64BitData(), _TIFFVSetField(), allocChoppedUpStripArrays(), buildMap(), CheckDirCount(), EstimateStripByteCounts(), JBIGDecode(), JPEGDecode(), JPEGEncode(), JPEGEncodeRaw(), JPEGFixupTagsSubsampling(), JPEGFixupTagsSubsamplingSec(), JPEGPreDecode(), JPEGSetupEncode(), LERCPreDecode(), LERCVSetField(), LZWPreDecode(), OJPEGLibjpegJpegErrorMgrOutputMessage(), OJPEGSetupDecode(), OJPEGSubsamplingCorrect(), PackBitsDecode(), PixarLogDecode(), setExtraSamples(), setorientation(), TIFFAdvanceDirectory(), TIFFClientOpenExt(), TIFFFetchDirectory(), TIFFFetchNormalTag(), TIFFFetchStripThing(), TIFFFieldWithName(), TIFFFieldWithTag(), TIFFFillStrip(), TIFFFillTile(), TIFFjpeg_output_message(), TIFFNumberOfStrips(), TIFFReadCustomDirectory(), TIFFReadDirectory(), TIFFReadDirectoryCheckOrder(), TIFFReadDirEntryArrayWithLimit(), TIFFReadDirEntryOutputErr(), TIFFReadDirEntryPersampleShort(), TIFFWriteDirectorySec(), TIFFWriteDirectoryTagColormap(), TIFFWriteDirectoryTagTransferfunction(), TWebPVSetField(), and ZSTDVSetField().