|
|
|
@ -33,6 +33,12 @@
|
|
|
|
|
#include "tiff.h"
|
|
|
|
|
#include "tiffvers.h"
|
|
|
|
|
|
|
|
|
|
#if defined(LIBTIFF_EXPORTS)
|
|
|
|
|
#define TIFF_DLL __declspec(dllexport)
|
|
|
|
|
#else /* use a DLL library */
|
|
|
|
|
#define TIFF_DLL __declspec(dllimport)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* TIFF is defined as an incomplete type to hide the
|
|
|
|
|
* library's internal data structures from clients.
|
|
|
|
@ -280,30 +286,30 @@ typedef int (*TIFFMapFileProc)(thandle_t, void** base, toff_t* size);
|
|
|
|
|
typedef void (*TIFFUnmapFileProc)(thandle_t, void* base, toff_t size);
|
|
|
|
|
typedef void (*TIFFExtendProc)(TIFF*);
|
|
|
|
|
|
|
|
|
|
extern const char* TIFFGetVersion(void);
|
|
|
|
|
TIFF_DLL extern const char* TIFFGetVersion(void);
|
|
|
|
|
|
|
|
|
|
extern const TIFFCodec* TIFFFindCODEC(uint16);
|
|
|
|
|
extern TIFFCodec* TIFFRegisterCODEC(uint16, const char*, TIFFInitMethod);
|
|
|
|
|
extern void TIFFUnRegisterCODEC(TIFFCodec*);
|
|
|
|
|
extern int TIFFIsCODECConfigured(uint16);
|
|
|
|
|
extern TIFFCodec* TIFFGetConfiguredCODECs(void);
|
|
|
|
|
TIFF_DLL extern const TIFFCodec* TIFFFindCODEC(uint16);
|
|
|
|
|
TIFF_DLL extern TIFFCodec* TIFFRegisterCODEC(uint16, const char*, TIFFInitMethod);
|
|
|
|
|
TIFF_DLL extern void TIFFUnRegisterCODEC(TIFFCodec*);
|
|
|
|
|
TIFF_DLL extern int TIFFIsCODECConfigured(uint16);
|
|
|
|
|
TIFF_DLL extern TIFFCodec* TIFFGetConfiguredCODECs(void);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Auxiliary functions.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
extern void* _TIFFmalloc(tmsize_t s);
|
|
|
|
|
extern void* _TIFFrealloc(void* p, tmsize_t s);
|
|
|
|
|
extern void _TIFFmemset(void* p, int v, tmsize_t c);
|
|
|
|
|
extern void _TIFFmemcpy(void* d, const void* s, tmsize_t c);
|
|
|
|
|
extern int _TIFFmemcmp(const void* p1, const void* p2, tmsize_t c);
|
|
|
|
|
extern void _TIFFfree(void* p);
|
|
|
|
|
TIFF_DLL extern void* _TIFFmalloc(tmsize_t s);
|
|
|
|
|
TIFF_DLL extern void* _TIFFrealloc(void* p, tmsize_t s);
|
|
|
|
|
TIFF_DLL extern void _TIFFmemset(void* p, int v, tmsize_t c);
|
|
|
|
|
TIFF_DLL extern void _TIFFmemcpy(void* d, const void* s, tmsize_t c);
|
|
|
|
|
TIFF_DLL extern int _TIFFmemcmp(const void* p1, const void* p2, tmsize_t c);
|
|
|
|
|
TIFF_DLL extern void _TIFFfree(void* p);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
** Stuff, related to tag handling and creating custom tags.
|
|
|
|
|
*/
|
|
|
|
|
extern int TIFFGetTagListCount( TIFF * );
|
|
|
|
|
extern uint32 TIFFGetTagListEntry( TIFF *, int tag_index );
|
|
|
|
|
TIFF_DLL extern int TIFFGetTagListCount( TIFF * );
|
|
|
|
|
TIFF_DLL extern uint32 TIFFGetTagListEntry( TIFF *, int tag_index );
|
|
|
|
|
|
|
|
|
|
#define TIFF_ANY TIFF_NOTYPE /* for field descriptor searching */
|
|
|
|
|
#define TIFF_VARIABLE -1 /* marker for variable length tags */
|
|
|
|
@ -315,9 +321,9 @@ extern uint32 TIFFGetTagListEntry( TIFF *, int tag_index );
|
|
|
|
|
typedef struct _TIFFField TIFFField;
|
|
|
|
|
typedef struct _TIFFFieldArray TIFFFieldArray;
|
|
|
|
|
|
|
|
|
|
extern const TIFFField* TIFFFindField(TIFF *, uint32, TIFFDataType);
|
|
|
|
|
extern const TIFFField* TIFFFieldWithTag(TIFF*, uint32);
|
|
|
|
|
extern const TIFFField* TIFFFieldWithName(TIFF*, const char *);
|
|
|
|
|
TIFF_DLL extern const TIFFField* TIFFFindField(TIFF *, uint32, TIFFDataType);
|
|
|
|
|
TIFF_DLL extern const TIFFField* TIFFFieldWithTag(TIFF*, uint32);
|
|
|
|
|
TIFF_DLL extern const TIFFField* TIFFFieldWithName(TIFF*, const char *);
|
|
|
|
|
|
|
|
|
|
typedef int (*TIFFVSetMethod)(TIFF*, uint32, va_list);
|
|
|
|
|
typedef int (*TIFFVGetMethod)(TIFF*, uint32, va_list);
|
|
|
|
@ -329,187 +335,187 @@ typedef struct {
|
|
|
|
|
TIFFPrintMethod printdir; /* directory print routine */
|
|
|
|
|
} TIFFTagMethods;
|
|
|
|
|
|
|
|
|
|
extern TIFFTagMethods *TIFFAccessTagMethods(TIFF *);
|
|
|
|
|
extern void *TIFFGetClientInfo(TIFF *, const char *);
|
|
|
|
|
extern void TIFFSetClientInfo(TIFF *, void *, const char *);
|
|
|
|
|
TIFF_DLL extern TIFFTagMethods *TIFFAccessTagMethods(TIFF *);
|
|
|
|
|
TIFF_DLL extern void *TIFFGetClientInfo(TIFF *, const char *);
|
|
|
|
|
TIFF_DLL extern void TIFFSetClientInfo(TIFF *, void *, const char *);
|
|
|
|
|
|
|
|
|
|
extern void TIFFCleanup(TIFF* tif);
|
|
|
|
|
extern void TIFFClose(TIFF* tif);
|
|
|
|
|
extern int TIFFFlush(TIFF* tif);
|
|
|
|
|
extern int TIFFFlushData(TIFF* tif);
|
|
|
|
|
extern int TIFFGetField(TIFF* tif, uint32 tag, ...);
|
|
|
|
|
extern int TIFFVGetField(TIFF* tif, uint32 tag, va_list ap);
|
|
|
|
|
extern int TIFFGetFieldDefaulted(TIFF* tif, uint32 tag, ...);
|
|
|
|
|
extern int TIFFVGetFieldDefaulted(TIFF* tif, uint32 tag, va_list ap);
|
|
|
|
|
extern int TIFFReadDirectory(TIFF* tif);
|
|
|
|
|
extern int TIFFReadCustomDirectory(TIFF* tif, toff_t diroff, const TIFFFieldArray* infoarray);
|
|
|
|
|
extern int TIFFReadEXIFDirectory(TIFF* tif, toff_t diroff);
|
|
|
|
|
extern uint64 TIFFScanlineSize64(TIFF* tif);
|
|
|
|
|
extern tmsize_t TIFFScanlineSize(TIFF* tif);
|
|
|
|
|
extern uint64 TIFFRasterScanlineSize64(TIFF* tif);
|
|
|
|
|
extern tmsize_t TIFFRasterScanlineSize(TIFF* tif);
|
|
|
|
|
extern uint64 TIFFStripSize64(TIFF* tif);
|
|
|
|
|
extern tmsize_t TIFFStripSize(TIFF* tif);
|
|
|
|
|
extern uint64 TIFFRawStripSize64(TIFF* tif, uint32 strip);
|
|
|
|
|
extern tmsize_t TIFFRawStripSize(TIFF* tif, uint32 strip);
|
|
|
|
|
extern uint64 TIFFVStripSize64(TIFF* tif, uint32 nrows);
|
|
|
|
|
extern tmsize_t TIFFVStripSize(TIFF* tif, uint32 nrows);
|
|
|
|
|
extern uint64 TIFFTileRowSize64(TIFF* tif);
|
|
|
|
|
extern tmsize_t TIFFTileRowSize(TIFF* tif);
|
|
|
|
|
extern uint64 TIFFTileSize64(TIFF* tif);
|
|
|
|
|
extern tmsize_t TIFFTileSize(TIFF* tif);
|
|
|
|
|
extern uint64 TIFFVTileSize64(TIFF* tif, uint32 nrows);
|
|
|
|
|
extern tmsize_t TIFFVTileSize(TIFF* tif, uint32 nrows);
|
|
|
|
|
extern uint32 TIFFDefaultStripSize(TIFF* tif, uint32 request);
|
|
|
|
|
extern void TIFFDefaultTileSize(TIFF*, uint32*, uint32*);
|
|
|
|
|
extern int TIFFFileno(TIFF*);
|
|
|
|
|
extern int TIFFSetFileno(TIFF*, int);
|
|
|
|
|
extern thandle_t TIFFClientdata(TIFF*);
|
|
|
|
|
extern thandle_t TIFFSetClientdata(TIFF*, thandle_t);
|
|
|
|
|
extern int TIFFGetMode(TIFF*);
|
|
|
|
|
extern int TIFFSetMode(TIFF*, int);
|
|
|
|
|
extern int TIFFIsTiled(TIFF*);
|
|
|
|
|
extern int TIFFIsByteSwapped(TIFF*);
|
|
|
|
|
extern int TIFFIsUpSampled(TIFF*);
|
|
|
|
|
extern int TIFFIsMSB2LSB(TIFF*);
|
|
|
|
|
extern int TIFFIsBigEndian(TIFF*);
|
|
|
|
|
extern TIFFReadWriteProc TIFFGetReadProc(TIFF*);
|
|
|
|
|
extern TIFFReadWriteProc TIFFGetWriteProc(TIFF*);
|
|
|
|
|
extern TIFFSeekProc TIFFGetSeekProc(TIFF*);
|
|
|
|
|
extern TIFFCloseProc TIFFGetCloseProc(TIFF*);
|
|
|
|
|
extern TIFFSizeProc TIFFGetSizeProc(TIFF*);
|
|
|
|
|
extern TIFFMapFileProc TIFFGetMapFileProc(TIFF*);
|
|
|
|
|
extern TIFFUnmapFileProc TIFFGetUnmapFileProc(TIFF*);
|
|
|
|
|
extern uint32 TIFFCurrentRow(TIFF*);
|
|
|
|
|
extern uint16 TIFFCurrentDirectory(TIFF*);
|
|
|
|
|
extern uint16 TIFFNumberOfDirectories(TIFF*);
|
|
|
|
|
extern uint64 TIFFCurrentDirOffset(TIFF*);
|
|
|
|
|
extern uint32 TIFFCurrentStrip(TIFF*);
|
|
|
|
|
extern uint32 TIFFCurrentTile(TIFF* tif);
|
|
|
|
|
extern int TIFFReadBufferSetup(TIFF* tif, void* bp, tmsize_t size);
|
|
|
|
|
extern int TIFFWriteBufferSetup(TIFF* tif, void* bp, tmsize_t size);
|
|
|
|
|
extern int TIFFSetupStrips(TIFF *);
|
|
|
|
|
extern int TIFFWriteCheck(TIFF*, int, const char *);
|
|
|
|
|
extern void TIFFFreeDirectory(TIFF*);
|
|
|
|
|
extern int TIFFCreateDirectory(TIFF*);
|
|
|
|
|
extern int TIFFLastDirectory(TIFF*);
|
|
|
|
|
extern int TIFFSetDirectory(TIFF*, uint16);
|
|
|
|
|
extern int TIFFSetSubDirectory(TIFF*, uint64);
|
|
|
|
|
extern int TIFFUnlinkDirectory(TIFF*, uint16);
|
|
|
|
|
extern int TIFFSetField(TIFF*, uint32, ...);
|
|
|
|
|
extern int TIFFVSetField(TIFF*, uint32, va_list);
|
|
|
|
|
extern int TIFFUnsetField(TIFF*, uint32);
|
|
|
|
|
extern int TIFFWriteDirectory(TIFF *);
|
|
|
|
|
extern int TIFFCheckpointDirectory(TIFF *);
|
|
|
|
|
extern int TIFFRewriteDirectory(TIFF *);
|
|
|
|
|
TIFF_DLL extern void TIFFCleanup(TIFF* tif);
|
|
|
|
|
TIFF_DLL extern void TIFFClose(TIFF* tif);
|
|
|
|
|
TIFF_DLL extern int TIFFFlush(TIFF* tif);
|
|
|
|
|
TIFF_DLL extern int TIFFFlushData(TIFF* tif);
|
|
|
|
|
TIFF_DLL extern int TIFFGetField(TIFF* tif, uint32 tag, ...);
|
|
|
|
|
TIFF_DLL extern int TIFFVGetField(TIFF* tif, uint32 tag, va_list ap);
|
|
|
|
|
TIFF_DLL extern int TIFFGetFieldDefaulted(TIFF* tif, uint32 tag, ...);
|
|
|
|
|
TIFF_DLL extern int TIFFVGetFieldDefaulted(TIFF* tif, uint32 tag, va_list ap);
|
|
|
|
|
TIFF_DLL extern int TIFFReadDirectory(TIFF* tif);
|
|
|
|
|
TIFF_DLL extern int TIFFReadCustomDirectory(TIFF* tif, toff_t diroff, const TIFFFieldArray* infoarray);
|
|
|
|
|
TIFF_DLL extern int TIFFReadEXIFDirectory(TIFF* tif, toff_t diroff);
|
|
|
|
|
TIFF_DLL extern uint64 TIFFScanlineSize64(TIFF* tif);
|
|
|
|
|
TIFF_DLL extern tmsize_t TIFFScanlineSize(TIFF* tif);
|
|
|
|
|
TIFF_DLL extern uint64 TIFFRasterScanlineSize64(TIFF* tif);
|
|
|
|
|
TIFF_DLL extern tmsize_t TIFFRasterScanlineSize(TIFF* tif);
|
|
|
|
|
TIFF_DLL extern uint64 TIFFStripSize64(TIFF* tif);
|
|
|
|
|
TIFF_DLL extern tmsize_t TIFFStripSize(TIFF* tif);
|
|
|
|
|
TIFF_DLL extern uint64 TIFFRawStripSize64(TIFF* tif, uint32 strip);
|
|
|
|
|
TIFF_DLL extern tmsize_t TIFFRawStripSize(TIFF* tif, uint32 strip);
|
|
|
|
|
TIFF_DLL extern uint64 TIFFVStripSize64(TIFF* tif, uint32 nrows);
|
|
|
|
|
TIFF_DLL extern tmsize_t TIFFVStripSize(TIFF* tif, uint32 nrows);
|
|
|
|
|
TIFF_DLL extern uint64 TIFFTileRowSize64(TIFF* tif);
|
|
|
|
|
TIFF_DLL extern tmsize_t TIFFTileRowSize(TIFF* tif);
|
|
|
|
|
TIFF_DLL extern uint64 TIFFTileSize64(TIFF* tif);
|
|
|
|
|
TIFF_DLL extern tmsize_t TIFFTileSize(TIFF* tif);
|
|
|
|
|
TIFF_DLL extern uint64 TIFFVTileSize64(TIFF* tif, uint32 nrows);
|
|
|
|
|
TIFF_DLL extern tmsize_t TIFFVTileSize(TIFF* tif, uint32 nrows);
|
|
|
|
|
TIFF_DLL extern uint32 TIFFDefaultStripSize(TIFF* tif, uint32 request);
|
|
|
|
|
TIFF_DLL extern void TIFFDefaultTileSize(TIFF*, uint32*, uint32*);
|
|
|
|
|
TIFF_DLL extern int TIFFFileno(TIFF*);
|
|
|
|
|
TIFF_DLL extern int TIFFSetFileno(TIFF*, int);
|
|
|
|
|
TIFF_DLL extern thandle_t TIFFClientdata(TIFF*);
|
|
|
|
|
TIFF_DLL extern thandle_t TIFFSetClientdata(TIFF*, thandle_t);
|
|
|
|
|
TIFF_DLL extern int TIFFGetMode(TIFF*);
|
|
|
|
|
TIFF_DLL extern int TIFFSetMode(TIFF*, int);
|
|
|
|
|
TIFF_DLL extern int TIFFIsTiled(TIFF*);
|
|
|
|
|
TIFF_DLL extern int TIFFIsByteSwapped(TIFF*);
|
|
|
|
|
TIFF_DLL extern int TIFFIsUpSampled(TIFF*);
|
|
|
|
|
TIFF_DLL extern int TIFFIsMSB2LSB(TIFF*);
|
|
|
|
|
TIFF_DLL extern int TIFFIsBigEndian(TIFF*);
|
|
|
|
|
TIFF_DLL extern TIFFReadWriteProc TIFFGetReadProc(TIFF*);
|
|
|
|
|
TIFF_DLL extern TIFFReadWriteProc TIFFGetWriteProc(TIFF*);
|
|
|
|
|
TIFF_DLL extern TIFFSeekProc TIFFGetSeekProc(TIFF*);
|
|
|
|
|
TIFF_DLL extern TIFFCloseProc TIFFGetCloseProc(TIFF*);
|
|
|
|
|
TIFF_DLL extern TIFFSizeProc TIFFGetSizeProc(TIFF*);
|
|
|
|
|
TIFF_DLL extern TIFFMapFileProc TIFFGetMapFileProc(TIFF*);
|
|
|
|
|
TIFF_DLL extern TIFFUnmapFileProc TIFFGetUnmapFileProc(TIFF*);
|
|
|
|
|
TIFF_DLL extern uint32 TIFFCurrentRow(TIFF*);
|
|
|
|
|
TIFF_DLL extern uint16 TIFFCurrentDirectory(TIFF*);
|
|
|
|
|
TIFF_DLL extern uint16 TIFFNumberOfDirectories(TIFF*);
|
|
|
|
|
TIFF_DLL extern uint64 TIFFCurrentDirOffset(TIFF*);
|
|
|
|
|
TIFF_DLL extern uint32 TIFFCurrentStrip(TIFF*);
|
|
|
|
|
TIFF_DLL extern uint32 TIFFCurrentTile(TIFF* tif);
|
|
|
|
|
TIFF_DLL extern int TIFFReadBufferSetup(TIFF* tif, void* bp, tmsize_t size);
|
|
|
|
|
TIFF_DLL extern int TIFFWriteBufferSetup(TIFF* tif, void* bp, tmsize_t size);
|
|
|
|
|
TIFF_DLL extern int TIFFSetupStrips(TIFF *);
|
|
|
|
|
TIFF_DLL extern int TIFFWriteCheck(TIFF*, int, const char *);
|
|
|
|
|
TIFF_DLL extern void TIFFFreeDirectory(TIFF*);
|
|
|
|
|
TIFF_DLL extern int TIFFCreateDirectory(TIFF*);
|
|
|
|
|
TIFF_DLL extern int TIFFLastDirectory(TIFF*);
|
|
|
|
|
TIFF_DLL extern int TIFFSetDirectory(TIFF*, uint16);
|
|
|
|
|
TIFF_DLL extern int TIFFSetSubDirectory(TIFF*, uint64);
|
|
|
|
|
TIFF_DLL extern int TIFFUnlinkDirectory(TIFF*, uint16);
|
|
|
|
|
TIFF_DLL extern int TIFFSetField(TIFF*, uint32, ...);
|
|
|
|
|
TIFF_DLL extern int TIFFVSetField(TIFF*, uint32, va_list);
|
|
|
|
|
TIFF_DLL extern int TIFFUnsetField(TIFF*, uint32);
|
|
|
|
|
TIFF_DLL extern int TIFFWriteDirectory(TIFF *);
|
|
|
|
|
TIFF_DLL extern int TIFFCheckpointDirectory(TIFF *);
|
|
|
|
|
TIFF_DLL extern int TIFFRewriteDirectory(TIFF *);
|
|
|
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
|
extern void TIFFPrintDirectory(TIFF*, FILE*, long = 0);
|
|
|
|
|
extern int TIFFReadScanline(TIFF* tif, void* buf, uint32 row, uint16 sample = 0);
|
|
|
|
|
extern int TIFFWriteScanline(TIFF* tif, void* buf, uint32 row, uint16 sample = 0);
|
|
|
|
|
extern int TIFFReadRGBAImage(TIFF*, uint32, uint32, uint32*, int = 0);
|
|
|
|
|
extern int TIFFReadRGBAImageOriented(TIFF*, uint32, uint32, uint32*,
|
|
|
|
|
TIFF_DLL extern void TIFFPrintDirectory(TIFF*, FILE*, long = 0);
|
|
|
|
|
TIFF_DLL extern int TIFFReadScanline(TIFF* tif, void* buf, uint32 row, uint16 sample = 0);
|
|
|
|
|
TIFF_DLL extern int TIFFWriteScanline(TIFF* tif, void* buf, uint32 row, uint16 sample = 0);
|
|
|
|
|
TIFF_DLL extern int TIFFReadRGBAImage(TIFF*, uint32, uint32, uint32*, int = 0);
|
|
|
|
|
TIFF_DLL extern int TIFFReadRGBAImageOriented(TIFF*, uint32, uint32, uint32*,
|
|
|
|
|
int = ORIENTATION_BOTLEFT, int = 0);
|
|
|
|
|
#else
|
|
|
|
|
extern void TIFFPrintDirectory(TIFF*, FILE*, long);
|
|
|
|
|
extern int TIFFReadScanline(TIFF* tif, void* buf, uint32 row, uint16 sample);
|
|
|
|
|
extern int TIFFWriteScanline(TIFF* tif, void* buf, uint32 row, uint16 sample);
|
|
|
|
|
extern int TIFFReadRGBAImage(TIFF*, uint32, uint32, uint32*, int);
|
|
|
|
|
extern int TIFFReadRGBAImageOriented(TIFF*, uint32, uint32, uint32*, int, int);
|
|
|
|
|
TIFF_DLL extern void TIFFPrintDirectory(TIFF*, FILE*, long);
|
|
|
|
|
TIFF_DLL extern int TIFFReadScanline(TIFF* tif, void* buf, uint32 row, uint16 sample);
|
|
|
|
|
TIFF_DLL extern int TIFFWriteScanline(TIFF* tif, void* buf, uint32 row, uint16 sample);
|
|
|
|
|
TIFF_DLL extern int TIFFReadRGBAImage(TIFF*, uint32, uint32, uint32*, int);
|
|
|
|
|
TIFF_DLL extern int TIFFReadRGBAImageOriented(TIFF*, uint32, uint32, uint32*, int, int);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
extern int TIFFReadRGBAStrip(TIFF*, uint32, uint32 * );
|
|
|
|
|
extern int TIFFReadRGBATile(TIFF*, uint32, uint32, uint32 * );
|
|
|
|
|
extern int TIFFRGBAImageOK(TIFF*, char [1024]);
|
|
|
|
|
extern int TIFFRGBAImageBegin(TIFFRGBAImage*, TIFF*, int, char [1024]);
|
|
|
|
|
extern int TIFFRGBAImageGet(TIFFRGBAImage*, uint32*, uint32, uint32);
|
|
|
|
|
extern void TIFFRGBAImageEnd(TIFFRGBAImage*);
|
|
|
|
|
extern TIFF* TIFFOpen(const char*, const char*);
|
|
|
|
|
TIFF_DLL extern int TIFFReadRGBAStrip(TIFF*, uint32, uint32 * );
|
|
|
|
|
TIFF_DLL extern int TIFFReadRGBATile(TIFF*, uint32, uint32, uint32 * );
|
|
|
|
|
TIFF_DLL extern int TIFFRGBAImageOK(TIFF*, char [1024]);
|
|
|
|
|
TIFF_DLL extern int TIFFRGBAImageBegin(TIFFRGBAImage*, TIFF*, int, char [1024]);
|
|
|
|
|
TIFF_DLL extern int TIFFRGBAImageGet(TIFFRGBAImage*, uint32*, uint32, uint32);
|
|
|
|
|
TIFF_DLL extern void TIFFRGBAImageEnd(TIFFRGBAImage*);
|
|
|
|
|
TIFF_DLL extern TIFF* TIFFOpen(const char*, const char*);
|
|
|
|
|
# ifdef __WIN32__
|
|
|
|
|
extern TIFF* TIFFOpenW(const wchar_t*, const char*);
|
|
|
|
|
TIFF_DLL extern TIFF* TIFFOpenW(const wchar_t*, const char*);
|
|
|
|
|
# endif /* __WIN32__ */
|
|
|
|
|
extern TIFF* TIFFFdOpen(int, const char*, const char*);
|
|
|
|
|
extern TIFF* TIFFClientOpen(const char*, const char*,
|
|
|
|
|
TIFF_DLL extern TIFF* TIFFFdOpen(int, const char*, const char*);
|
|
|
|
|
TIFF_DLL extern TIFF* TIFFClientOpen(const char*, const char*,
|
|
|
|
|
thandle_t,
|
|
|
|
|
TIFFReadWriteProc, TIFFReadWriteProc,
|
|
|
|
|
TIFFSeekProc, TIFFCloseProc,
|
|
|
|
|
TIFFSizeProc,
|
|
|
|
|
TIFFMapFileProc, TIFFUnmapFileProc);
|
|
|
|
|
extern const char* TIFFFileName(TIFF*);
|
|
|
|
|
extern const char* TIFFSetFileName(TIFF*, const char *);
|
|
|
|
|
extern void TIFFError(const char*, const char*, ...) __attribute__((__format__ (__printf__,2,3)));
|
|
|
|
|
extern void TIFFErrorExt(thandle_t, const char*, const char*, ...) __attribute__((__format__ (__printf__,3,4)));
|
|
|
|
|
extern void TIFFWarning(const char*, const char*, ...) __attribute__((__format__ (__printf__,2,3)));
|
|
|
|
|
extern void TIFFWarningExt(thandle_t, const char*, const char*, ...) __attribute__((__format__ (__printf__,3,4)));
|
|
|
|
|
extern TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler);
|
|
|
|
|
extern TIFFErrorHandlerExt TIFFSetErrorHandlerExt(TIFFErrorHandlerExt);
|
|
|
|
|
extern TIFFErrorHandler TIFFSetWarningHandler(TIFFErrorHandler);
|
|
|
|
|
extern TIFFErrorHandlerExt TIFFSetWarningHandlerExt(TIFFErrorHandlerExt);
|
|
|
|
|
extern TIFFExtendProc TIFFSetTagExtender(TIFFExtendProc);
|
|
|
|
|
extern uint32 TIFFComputeTile(TIFF* tif, uint32 x, uint32 y, uint32 z, uint16 s);
|
|
|
|
|
extern int TIFFCheckTile(TIFF* tif, uint32 x, uint32 y, uint32 z, uint16 s);
|
|
|
|
|
extern uint32 TIFFNumberOfTiles(TIFF*);
|
|
|
|
|
extern tmsize_t TIFFReadTile(TIFF* tif, void* buf, uint32 x, uint32 y, uint32 z, uint16 s);
|
|
|
|
|
extern tmsize_t TIFFWriteTile(TIFF* tif, void* buf, uint32 x, uint32 y, uint32 z, uint16 s);
|
|
|
|
|
extern uint32 TIFFComputeStrip(TIFF*, uint32, uint16);
|
|
|
|
|
extern uint32 TIFFNumberOfStrips(TIFF*);
|
|
|
|
|
extern tmsize_t TIFFReadEncodedStrip(TIFF* tif, uint32 strip, void* buf, tmsize_t size);
|
|
|
|
|
extern tmsize_t TIFFReadRawStrip(TIFF* tif, uint32 strip, void* buf, tmsize_t size);
|
|
|
|
|
extern tmsize_t TIFFReadEncodedTile(TIFF* tif, uint32 tile, void* buf, tmsize_t size);
|
|
|
|
|
extern tmsize_t TIFFReadRawTile(TIFF* tif, uint32 tile, void* buf, tmsize_t size);
|
|
|
|
|
extern tmsize_t TIFFWriteEncodedStrip(TIFF* tif, uint32 strip, void* data, tmsize_t cc);
|
|
|
|
|
extern tmsize_t TIFFWriteRawStrip(TIFF* tif, uint32 strip, void* data, tmsize_t cc);
|
|
|
|
|
extern tmsize_t TIFFWriteEncodedTile(TIFF* tif, uint32 tile, void* data, tmsize_t cc);
|
|
|
|
|
extern tmsize_t TIFFWriteRawTile(TIFF* tif, uint32 tile, void* data, tmsize_t cc);
|
|
|
|
|
extern int TIFFDataWidth(TIFFDataType); /* table of tag datatype widths */
|
|
|
|
|
extern void TIFFSetWriteOffset(TIFF* tif, toff_t off);
|
|
|
|
|
extern void TIFFSwabShort(uint16*);
|
|
|
|
|
extern void TIFFSwabLong(uint32*);
|
|
|
|
|
extern void TIFFSwabLong8(uint64*);
|
|
|
|
|
extern void TIFFSwabFloat(float*);
|
|
|
|
|
extern void TIFFSwabDouble(double*);
|
|
|
|
|
extern void TIFFSwabArrayOfShort(uint16* wp, tmsize_t n);
|
|
|
|
|
extern void TIFFSwabArrayOfTriples(uint8* tp, tmsize_t n);
|
|
|
|
|
extern void TIFFSwabArrayOfLong(uint32* lp, tmsize_t n);
|
|
|
|
|
extern void TIFFSwabArrayOfLong8(uint64* lp, tmsize_t n);
|
|
|
|
|
extern void TIFFSwabArrayOfFloat(float* fp, tmsize_t n);
|
|
|
|
|
extern void TIFFSwabArrayOfDouble(double* dp, tmsize_t n);
|
|
|
|
|
extern void TIFFReverseBits(uint8* cp, tmsize_t n);
|
|
|
|
|
extern const unsigned char* TIFFGetBitRevTable(int);
|
|
|
|
|
TIFF_DLL extern const char* TIFFFileName(TIFF*);
|
|
|
|
|
TIFF_DLL extern const char* TIFFSetFileName(TIFF*, const char *);
|
|
|
|
|
TIFF_DLL extern void TIFFError(const char*, const char*, ...) __attribute__((__format__ (__printf__,2,3)));
|
|
|
|
|
TIFF_DLL extern void TIFFErrorExt(thandle_t, const char*, const char*, ...) __attribute__((__format__ (__printf__,3,4)));
|
|
|
|
|
TIFF_DLL extern void TIFFWarning(const char*, const char*, ...) __attribute__((__format__ (__printf__,2,3)));
|
|
|
|
|
TIFF_DLL extern void TIFFWarningExt(thandle_t, const char*, const char*, ...) __attribute__((__format__ (__printf__,3,4)));
|
|
|
|
|
TIFF_DLL extern TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler);
|
|
|
|
|
TIFF_DLL extern TIFFErrorHandlerExt TIFFSetErrorHandlerExt(TIFFErrorHandlerExt);
|
|
|
|
|
TIFF_DLL extern TIFFErrorHandler TIFFSetWarningHandler(TIFFErrorHandler);
|
|
|
|
|
TIFF_DLL extern TIFFErrorHandlerExt TIFFSetWarningHandlerExt(TIFFErrorHandlerExt);
|
|
|
|
|
TIFF_DLL extern TIFFExtendProc TIFFSetTagExtender(TIFFExtendProc);
|
|
|
|
|
TIFF_DLL extern uint32 TIFFComputeTile(TIFF* tif, uint32 x, uint32 y, uint32 z, uint16 s);
|
|
|
|
|
TIFF_DLL extern int TIFFCheckTile(TIFF* tif, uint32 x, uint32 y, uint32 z, uint16 s);
|
|
|
|
|
TIFF_DLL extern uint32 TIFFNumberOfTiles(TIFF*);
|
|
|
|
|
TIFF_DLL extern tmsize_t TIFFReadTile(TIFF* tif, void* buf, uint32 x, uint32 y, uint32 z, uint16 s);
|
|
|
|
|
TIFF_DLL extern tmsize_t TIFFWriteTile(TIFF* tif, void* buf, uint32 x, uint32 y, uint32 z, uint16 s);
|
|
|
|
|
TIFF_DLL extern uint32 TIFFComputeStrip(TIFF*, uint32, uint16);
|
|
|
|
|
TIFF_DLL extern uint32 TIFFNumberOfStrips(TIFF*);
|
|
|
|
|
TIFF_DLL extern tmsize_t TIFFReadEncodedStrip(TIFF* tif, uint32 strip, void* buf, tmsize_t size);
|
|
|
|
|
TIFF_DLL extern tmsize_t TIFFReadRawStrip(TIFF* tif, uint32 strip, void* buf, tmsize_t size);
|
|
|
|
|
TIFF_DLL extern tmsize_t TIFFReadEncodedTile(TIFF* tif, uint32 tile, void* buf, tmsize_t size);
|
|
|
|
|
TIFF_DLL extern tmsize_t TIFFReadRawTile(TIFF* tif, uint32 tile, void* buf, tmsize_t size);
|
|
|
|
|
TIFF_DLL extern tmsize_t TIFFWriteEncodedStrip(TIFF* tif, uint32 strip, void* data, tmsize_t cc);
|
|
|
|
|
TIFF_DLL extern tmsize_t TIFFWriteRawStrip(TIFF* tif, uint32 strip, void* data, tmsize_t cc);
|
|
|
|
|
TIFF_DLL extern tmsize_t TIFFWriteEncodedTile(TIFF* tif, uint32 tile, void* data, tmsize_t cc);
|
|
|
|
|
TIFF_DLL extern tmsize_t TIFFWriteRawTile(TIFF* tif, uint32 tile, void* data, tmsize_t cc);
|
|
|
|
|
TIFF_DLL extern int TIFFDataWidth(TIFFDataType); /* table of tag datatype widths */
|
|
|
|
|
TIFF_DLL extern void TIFFSetWriteOffset(TIFF* tif, toff_t off);
|
|
|
|
|
TIFF_DLL extern void TIFFSwabShort(uint16*);
|
|
|
|
|
TIFF_DLL extern void TIFFSwabLong(uint32*);
|
|
|
|
|
TIFF_DLL extern void TIFFSwabLong8(uint64*);
|
|
|
|
|
TIFF_DLL extern void TIFFSwabFloat(float*);
|
|
|
|
|
TIFF_DLL extern void TIFFSwabDouble(double*);
|
|
|
|
|
TIFF_DLL extern void TIFFSwabArrayOfShort(uint16* wp, tmsize_t n);
|
|
|
|
|
TIFF_DLL extern void TIFFSwabArrayOfTriples(uint8* tp, tmsize_t n);
|
|
|
|
|
TIFF_DLL extern void TIFFSwabArrayOfLong(uint32* lp, tmsize_t n);
|
|
|
|
|
TIFF_DLL extern void TIFFSwabArrayOfLong8(uint64* lp, tmsize_t n);
|
|
|
|
|
TIFF_DLL extern void TIFFSwabArrayOfFloat(float* fp, tmsize_t n);
|
|
|
|
|
TIFF_DLL extern void TIFFSwabArrayOfDouble(double* dp, tmsize_t n);
|
|
|
|
|
TIFF_DLL extern void TIFFReverseBits(uint8* cp, tmsize_t n);
|
|
|
|
|
TIFF_DLL extern const unsigned char* TIFFGetBitRevTable(int);
|
|
|
|
|
|
|
|
|
|
#ifdef LOGLUV_PUBLIC
|
|
|
|
|
#define U_NEU 0.210526316
|
|
|
|
|
#define V_NEU 0.473684211
|
|
|
|
|
#define UVSCALE 410.
|
|
|
|
|
extern double LogL16toY(int);
|
|
|
|
|
extern double LogL10toY(int);
|
|
|
|
|
extern void XYZtoRGB24(float*, uint8*);
|
|
|
|
|
extern int uv_decode(double*, double*, int);
|
|
|
|
|
extern void LogLuv24toXYZ(uint32, float*);
|
|
|
|
|
extern void LogLuv32toXYZ(uint32, float*);
|
|
|
|
|
TIFF_DLL extern double LogL16toY(int);
|
|
|
|
|
TIFF_DLL extern double LogL10toY(int);
|
|
|
|
|
TIFF_DLL extern void XYZtoRGB24(float*, uint8*);
|
|
|
|
|
TIFF_DLL extern int uv_decode(double*, double*, int);
|
|
|
|
|
TIFF_DLL extern void LogLuv24toXYZ(uint32, float*);
|
|
|
|
|
TIFF_DLL extern void LogLuv32toXYZ(uint32, float*);
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
|
extern int LogL16fromY(double, int = SGILOGENCODE_NODITHER);
|
|
|
|
|
extern int LogL10fromY(double, int = SGILOGENCODE_NODITHER);
|
|
|
|
|
extern int uv_encode(double, double, int = SGILOGENCODE_NODITHER);
|
|
|
|
|
extern uint32 LogLuv24fromXYZ(float*, int = SGILOGENCODE_NODITHER);
|
|
|
|
|
extern uint32 LogLuv32fromXYZ(float*, int = SGILOGENCODE_NODITHER);
|
|
|
|
|
TIFF_DLL extern int LogL16fromY(double, int = SGILOGENCODE_NODITHER);
|
|
|
|
|
TIFF_DLL extern int LogL10fromY(double, int = SGILOGENCODE_NODITHER);
|
|
|
|
|
TIFF_DLL extern int uv_encode(double, double, int = SGILOGENCODE_NODITHER);
|
|
|
|
|
TIFF_DLL extern uint32 LogLuv24fromXYZ(float*, int = SGILOGENCODE_NODITHER);
|
|
|
|
|
TIFF_DLL extern uint32 LogLuv32fromXYZ(float*, int = SGILOGENCODE_NODITHER);
|
|
|
|
|
#else
|
|
|
|
|
extern int LogL16fromY(double, int);
|
|
|
|
|
extern int LogL10fromY(double, int);
|
|
|
|
|
extern int uv_encode(double, double, int);
|
|
|
|
|
extern uint32 LogLuv24fromXYZ(float*, int);
|
|
|
|
|
extern uint32 LogLuv32fromXYZ(float*, int);
|
|
|
|
|
TIFF_DLL extern int LogL16fromY(double, int);
|
|
|
|
|
TIFF_DLL extern int LogL10fromY(double, int);
|
|
|
|
|
TIFF_DLL extern int uv_encode(double, double, int);
|
|
|
|
|
TIFF_DLL extern uint32 LogLuv24fromXYZ(float*, int);
|
|
|
|
|
TIFF_DLL extern uint32 LogLuv32fromXYZ(float*, int);
|
|
|
|
|
#endif
|
|
|
|
|
#endif /* LOGLUV_PUBLIC */
|
|
|
|
|
|
|
|
|
|
extern int TIFFCIELabToRGBInit(TIFFCIELabToRGB*, const TIFFDisplay *, float*);
|
|
|
|
|
extern void TIFFCIELabToXYZ(TIFFCIELabToRGB *, uint32, int32, int32,
|
|
|
|
|
TIFF_DLL extern int TIFFCIELabToRGBInit(TIFFCIELabToRGB*, const TIFFDisplay *, float*);
|
|
|
|
|
TIFF_DLL extern void TIFFCIELabToXYZ(TIFFCIELabToRGB *, uint32, int32, int32,
|
|
|
|
|
float *, float *, float *);
|
|
|
|
|
extern void TIFFXYZToRGB(TIFFCIELabToRGB *, float, float, float,
|
|
|
|
|
TIFF_DLL extern void TIFFXYZToRGB(TIFFCIELabToRGB *, float, float, float,
|
|
|
|
|
uint32 *, uint32 *, uint32 *);
|
|
|
|
|
|
|
|
|
|
extern int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB*, float*, float*);
|
|
|
|
|
extern void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *, uint32, int32, int32,
|
|
|
|
|
TIFF_DLL extern int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB*, float*, float*);
|
|
|
|
|
TIFF_DLL extern void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *, uint32, int32, int32,
|
|
|
|
|
uint32 *, uint32 *, uint32 *);
|
|
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
@ -529,7 +535,7 @@ typedef struct {
|
|
|
|
|
char *field_name; /* ASCII name */
|
|
|
|
|
} TIFFFieldInfo;
|
|
|
|
|
|
|
|
|
|
extern int TIFFMergeFieldInfo(TIFF*, const TIFFFieldInfo[], uint32);
|
|
|
|
|
TIFF_DLL extern int TIFFMergeFieldInfo(TIFF*, const TIFFFieldInfo[], uint32);
|
|
|
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
|
}
|
|
|
|
|