w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

tiffio.h
Go to the documentation of this file.
1 /* $Header: /cvsroot/osrs/libtiff/libtiff/tiffio.h,v 1.27 2003/12/22 21:06:04 dron Exp $ */
2 
3 /*
4  * Copyright (c) 1988-1997 Sam Leffler
5  * Copyright (c) 1991-1997 Silicon Graphics, Inc.
6  *
7  * Permission to use, copy, modify, distribute, and sell this software and
8  * its documentation for any purpose is hereby granted without fee, provided
9  * that (i) the above copyright notices and this permission notice appear in
10  * all copies of the software and related documentation, and (ii) the names of
11  * Sam Leffler and Silicon Graphics may not be used in any advertising or
12  * publicity relating to the software without the specific, prior written
13  * permission of Sam Leffler and Silicon Graphics.
14  *
15  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
16  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
17  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
18  *
19  * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
20  * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
21  * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
22  * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
23  * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
24  * OF THIS SOFTWARE.
25  */
26 
27 #ifndef _TIFFIO_
28 #define _TIFFIO_
29 
30 /*
31  * TIFF I/O Library Definitions.
32  */
33 #include "tiff.h"
34 #include "tiffvers.h"
35 
36 /*
37  * TIFF is defined as an incomplete type to hide the
38  * library's internal data structures from clients.
39  */
40 typedef struct tiff TIFF;
41 
42 /*
43  * The following typedefs define the intrinsic size of
44  * data types used in the *exported* interfaces. These
45  * definitions depend on the proper definition of types
46  * in tiff.h. Note also that the varargs interface used
47  * to pass tag types and values uses the types defined in
48  * tiff.h directly.
49  *
50  * NB: ttag_t is unsigned int and not unsigned short because
51  * ANSI C requires that the type before the ellipsis be a
52  * promoted type (i.e. one of int, unsigned int, pointer,
53  * or double) and because we defined pseudo-tags that are
54  * outside the range of legal Aldus-assigned tags.
55  * NB: tsize_t is int32 and not uint32 because some functions
56  * return -1.
57  * NB: toff_t is not off_t for many reasons; TIFFs max out at
58  * 32-bit file offsets being the most important, and to ensure
59  * that it is unsigned, rather than signed.
60  */
61 typedef uint32 ttag_t; /* directory tag */
62 typedef uint16 tdir_t; /* directory index */
63 typedef uint16 tsample_t; /* sample number */
64 typedef uint32 tstrip_t; /* strip number */
65 typedef uint32 ttile_t; /* tile number */
66 typedef int32 tsize_t; /* i/o size in bytes */
67 typedef void* tdata_t; /* image data ref */
68 typedef uint32 toff_t; /* file offset */
69 
70 #if !defined(__WIN32__) && (defined(_WIN32) || defined(WIN32))
71 #define __WIN32__
72 #endif
73 
74 /*
75  * On windows you should define USE_WIN32_FILEIO if you are using tif_win32.c
76  * or AVOID_WIN32_FILEIO if you are using something else (like tif_unix.c).
77  *
78  * By default tif_win32.c is assumed on windows if not using the cygwin
79  * environment.
80  */
81 
82 #if defined(_WINDOWS) || defined(__WIN32__) || defined(_Windows)
83 # if !defined(__CYGWIN) && !defined(AVOID_WIN32_FILEIO) && !defined(USE_WIN32_FILIO)
84 # define USE_WIN32_FILEIO
85 # endif
86 #endif
87 
88 #if defined(USE_WIN32_FILEIO)
89 #include <windows.h>
90 #ifdef __WIN32__
91 DECLARE_HANDLE(thandle_t); /* Win32 file handle */
92 #else
93 typedef HFILE thandle_t; /* client data handle */
94 #endif
95 #else
96 typedef void* thandle_t; /* client data handle */
97 #endif
98 
99 #ifndef NULL
100 #define NULL 0
101 #endif
102 
103 /*
104  * Flags to pass to TIFFPrintDirectory to control
105  * printing of data structures that are potentially
106  * very large. Bit-or these flags to enable printing
107  * multiple items.
108  */
109 #define TIFFPRINT_NONE 0x0 /* no extra info */
110 #define TIFFPRINT_STRIPS 0x1 /* strips/tiles info */
111 #define TIFFPRINT_CURVES 0x2 /* color/gray response curves */
112 #define TIFFPRINT_COLORMAP 0x4 /* colormap */
113 #define TIFFPRINT_JPEGQTABLES 0x100 /* JPEG Q matrices */
114 #define TIFFPRINT_JPEGACTABLES 0x200 /* JPEG AC tables */
115 #define TIFFPRINT_JPEGDCTABLES 0x200 /* JPEG DC tables */
116 
117 /*
118  * Colour conversion stuff
119  */
120 
121 /* reference white */
122 #define D65_X0 (95.0470F)
123 #define D65_Y0 (100.0F)
124 #define D65_Z0 (108.8827F)
125 
126 #define D50_X0 (96.4250F)
127 #define D50_Y0 (100.0F)
128 #define D50_Z0 (82.4680F)
129 
130 /* Structure for holding information about a display device. */
131 
132 typedef unsigned char TIFFRGBValue; /* 8-bit samples */
133 
134 typedef struct {
135  float d_mat[3][3]; /* XYZ -> luminance matrix */
136  float d_YCR; /* Light o/p for reference white */
137  float d_YCG;
138  float d_YCB;
139  uint32 d_Vrwr; /* Pixel values for ref. white */
142  float d_Y0R; /* Residual light for black pixel */
143  float d_Y0G;
144  float d_Y0B;
145  float d_gammaR; /* Gamma values for the three guns */
146  float d_gammaG;
147  float d_gammaB;
148 } TIFFDisplay;
149 
150 typedef struct { /* YCbCr->RGB support */
151  TIFFRGBValue* clamptab; /* range clamping table */
152  int* Cr_r_tab;
153  int* Cb_b_tab;
154  int32* Cr_g_tab;
155  int32* Cb_g_tab;
158 
159 typedef struct { /* CIE Lab 1976->RGB support */
160  int range; /* Size of conversion table */
161 #define CIELABTORGB_TABLE_RANGE 1500
162  float rstep, gstep, bstep;
163  float X0, Y0, Z0; /* Reference white point */
165  float Yr2r[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yr to r */
166  float Yg2g[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yg to g */
167  float Yb2b[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yb to b */
169 
170 extern int TIFFCIELabToRGBInit(TIFFCIELabToRGB*, TIFFDisplay *, float*);
172  float *, float *, float *);
173 extern void TIFFXYZToRGB(TIFFCIELabToRGB *, float, float, float,
174  uint32 *, uint32 *, uint32 *);
175 
176 extern int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB*, float*, float*);
178  uint32 *, uint32 *, uint32 *);
179 
180 /*
181  * RGBA-style image support.
182  */
183 typedef struct _TIFFRGBAImage TIFFRGBAImage;
184 /*
185  * The image reading and conversion routines invoke
186  * ``put routines'' to copy/image/whatever tiles of
187  * raw image data. A default set of routines are
188  * provided to convert/copy raw image data to 8-bit
189  * packed ABGR format rasters. Applications can supply
190  * alternate routines that unpack the data into a
191  * different format or, for example, unpack the data
192  * and draw the unpacked raster on the display.
193  */
196  unsigned char*);
199  unsigned char*, unsigned char*, unsigned char*, unsigned char*);
200 /*
201  * RGBA-reader state.
202  */
203 struct _TIFFRGBAImage {
204  TIFF* tif; /* image handle */
205  int stoponerr; /* stop on read error */
206  int isContig; /* data is packed/separate */
207  int alpha; /* type of alpha data present */
208  uint32 width; /* image width */
209  uint32 height; /* image height */
210  uint16 bitspersample; /* image bits/sample */
211  uint16 samplesperpixel; /* image samples/pixel */
212  uint16 orientation; /* image orientation */
213  uint16 req_orientation; /* requested orientation */
214  uint16 photometric; /* image photometric interp */
215  uint16* redcmap; /* colormap pallete */
216  uint16* greencmap;
217  uint16* bluecmap;
218  /* get image data routine */
220  union {
221  void (*any)(TIFFRGBAImage*);
224  } put; /* put decoded strip/tile */
225  TIFFRGBValue* Map; /* sample mapping array */
226  uint32** BWmap; /* black&white map */
227  uint32** PALmap; /* palette image map */
228  TIFFYCbCrToRGB* ycbcr; /* YCbCr conversion state */
229  TIFFCIELabToRGB* cielab; /* CIE L*a*b conversion state */
230 
231  int row_offset;
232  int col_offset;
233 };
234 
235 /*
236  * Macros for extracting components from the
237  * packed ABGR form returned by TIFFReadRGBAImage.
238  */
239 #define TIFFGetR(abgr) ((abgr) & 0xff)
240 #define TIFFGetG(abgr) (((abgr) >> 8) & 0xff)
241 #define TIFFGetB(abgr) (((abgr) >> 16) & 0xff)
242 #define TIFFGetA(abgr) (((abgr) >> 24) & 0xff)
243 
244 /*
245  * A CODEC is a software package that implements decoding,
246  * encoding, or decoding+encoding of a compression algorithm.
247  * The library provides a collection of builtin codecs.
248  * More codecs may be registered through calls to the library
249  * and/or the builtin implementations may be overridden.
250  */
251 typedef int (*TIFFInitMethod)(TIFF*, int);
252 typedef struct {
253  char* name;
254  uint16 scheme;
256 } TIFFCodec;
257 
258 #include <stdio.h>
259 #include <stdarg.h>
260 
261 /* share internal LogLuv conversion routines? */
262 #ifndef LOGLUV_PUBLIC
263 #define LOGLUV_PUBLIC 1
264 #endif
265 
266 #if defined(__cplusplus)
267 extern "C" {
268 #endif
269 typedef void (*TIFFErrorHandler)(const char*, const char*, va_list);
276 typedef void (*TIFFExtendProc)(TIFF*);
277 
278 extern const char* TIFFGetVersion(void);
279 
280 extern const TIFFCodec* TIFFFindCODEC(uint16);
281 extern TIFFCodec* TIFFRegisterCODEC(uint16, const char*, TIFFInitMethod);
282 extern void TIFFUnRegisterCODEC(TIFFCodec*);
283 extern int TIFFIsCODECConfigured(uint16);
284 
285 extern tdata_t _TIFFmalloc(tsize_t);
287 extern void _TIFFmemset(tdata_t, int, tsize_t);
288 extern void _TIFFmemcpy(tdata_t, const tdata_t, tsize_t);
289 extern int _TIFFmemcmp(const tdata_t, const tdata_t, tsize_t);
290 extern void _TIFFfree(tdata_t);
291 
292 extern void TIFFClose(TIFF*);
293 extern int TIFFFlush(TIFF*);
294 extern int TIFFFlushData(TIFF*);
295 extern int TIFFGetField(TIFF*, ttag_t, ...);
296 extern int TIFFVGetField(TIFF*, ttag_t, va_list);
297 extern int TIFFGetFieldDefaulted(TIFF*, ttag_t, ...);
299 extern int TIFFReadDirectory(TIFF*);
300 extern tsize_t TIFFScanlineSize(TIFF*);
302 extern tsize_t TIFFStripSize(TIFF*);
305 extern tsize_t TIFFTileRowSize(TIFF*);
306 extern tsize_t TIFFTileSize(TIFF*);
307 extern tsize_t TIFFVTileSize(TIFF*, uint32);
309 extern void TIFFDefaultTileSize(TIFF*, uint32*, uint32*);
310 extern int TIFFFileno(TIFF*);
311 extern int TIFFGetMode(TIFF*);
312 extern int TIFFIsTiled(TIFF*);
313 extern int TIFFIsByteSwapped(TIFF*);
314 extern int TIFFIsUpSampled(TIFF*);
315 extern int TIFFIsMSB2LSB(TIFF*);
316 extern uint32 TIFFCurrentRow(TIFF*);
321 extern ttile_t TIFFCurrentTile(TIFF*);
322 extern int TIFFReadBufferSetup(TIFF*, tdata_t, tsize_t);
324 extern int TIFFSetupStrips(TIFF *);
325 extern int TIFFWriteCheck(TIFF*, int, const char *);
326 extern int TIFFCreateDirectory(TIFF*);
327 extern int TIFFLastDirectory(TIFF*);
328 extern int TIFFSetDirectory(TIFF*, tdir_t);
329 extern int TIFFSetSubDirectory(TIFF*, uint32);
330 extern int TIFFUnlinkDirectory(TIFF*, tdir_t);
331 extern int TIFFSetField(TIFF*, ttag_t, ...);
332 extern int TIFFVSetField(TIFF*, ttag_t, va_list);
333 extern int TIFFWriteDirectory(TIFF *);
334 extern int TIFFCheckpointDirectory(TIFF *);
335 extern int TIFFRewriteDirectory(TIFF *);
336 extern int TIFFReassignTagToIgnore(enum TIFFIgnoreSense, int);
337 
338 #if defined(c_plusplus) || defined(__cplusplus)
339 extern void TIFFPrintDirectory(TIFF*, FILE*, long = 0);
340 extern int TIFFReadScanline(TIFF*, tdata_t, uint32, tsample_t = 0);
341 extern int TIFFWriteScanline(TIFF*, tdata_t, uint32, tsample_t = 0);
342 extern int TIFFReadRGBAImage(TIFF*, uint32, uint32, uint32*, int = 0);
344  int = ORIENTATION_BOTLEFT, int = 0);
345 #else
346 extern void TIFFPrintDirectory(TIFF*, FILE*, long);
349 extern int TIFFReadRGBAImage(TIFF*, uint32, uint32, uint32*, int);
350 extern int TIFFReadRGBAImageOriented(TIFF*, uint32, uint32, uint32*, int, int);
351 #endif
352 
353 extern int TIFFReadRGBAStrip(TIFF*, tstrip_t, uint32 * );
354 extern int TIFFReadRGBATile(TIFF*, uint32, uint32, uint32 * );
355 extern int TIFFRGBAImageOK(TIFF*, char [1024]);
356 extern int TIFFRGBAImageBegin(TIFFRGBAImage*, TIFF*, int, char [1024]);
358 extern void TIFFRGBAImageEnd(TIFFRGBAImage*);
359 extern TIFF* TIFFOpen(const char*, const char*);
360 extern TIFF* TIFFFdOpen(int, const char*, const char*);
361 extern TIFF* TIFFClientOpen(const char*, const char*,
362  thandle_t,
365  TIFFSizeProc,
367 extern const char* TIFFFileName(TIFF*);
368 extern void TIFFError(const char*, const char*, ...);
369 extern void TIFFWarning(const char*, const char*, ...);
376 extern tsize_t TIFFReadTile(TIFF*,
378 extern tsize_t TIFFWriteTile(TIFF*,
390 extern int TIFFDataWidth(TIFFDataType); /* table of tag datatype widths */
391 extern void TIFFSetWriteOffset(TIFF*, toff_t);
392 extern void TIFFSwabShort(uint16*);
393 extern void TIFFSwabLong(uint32*);
394 extern void TIFFSwabDouble(double*);
395 extern void TIFFSwabArrayOfShort(uint16*, unsigned long);
396 extern void TIFFSwabArrayOfLong(uint32*, unsigned long);
397 extern void TIFFSwabArrayOfDouble(double*, unsigned long);
398 extern void TIFFReverseBits(unsigned char *, unsigned long);
399 extern const unsigned char* TIFFGetBitRevTable(int);
400 
401 #ifdef LOGLUV_PUBLIC
402 #define U_NEU 0.210526316
403 #define V_NEU 0.473684211
404 #define UVSCALE 410.
405 extern double LogL16toY(int);
406 extern double LogL10toY(int);
407 extern void XYZtoRGB24(float*, uint8*);
408 extern int uv_decode(double*, double*, int);
409 extern void LogLuv24toXYZ(uint32, float*);
410 extern void LogLuv32toXYZ(uint32, float*);
411 #if defined(c_plusplus) || defined(__cplusplus)
412 extern int LogL16fromY(double, int = SGILOGENCODE_NODITHER);
413 extern int LogL10fromY(double, int = SGILOGENCODE_NODITHER);
414 extern int uv_encode(double, double, int = SGILOGENCODE_NODITHER);
415 extern uint32 LogLuv24fromXYZ(float*, int = SGILOGENCODE_NODITHER);
416 extern uint32 LogLuv32fromXYZ(float*, int = SGILOGENCODE_NODITHER);
417 #else
418 extern int LogL16fromY(double, int);
419 extern int LogL10fromY(double, int);
420 extern int uv_encode(double, double, int);
421 extern uint32 LogLuv24fromXYZ(float*, int);
422 extern uint32 LogLuv32fromXYZ(float*, int);
423 #endif
424 #endif /* LOGLUV_PUBLIC */
425 
426 /*
427 ** New stuff going public in 3.6.x.
428 */
429 extern int TIFFGetTagListCount( TIFF * );
430 extern ttag_t TIFFGetTagListEntry( TIFF *, int tag_index );
431 
432 #define TIFF_ANY TIFF_NOTYPE /* for field descriptor searching */
433 #define TIFF_VARIABLE -1 /* marker for variable length tags */
434 #define TIFF_SPP -2 /* marker for SamplesPerPixel tags */
435 #define TIFF_VARIABLE2 -3 /* marker for uint32 var-length tags */
436 
437 #define FIELD_CUSTOM 65
438 
439 typedef struct {
440  ttag_t field_tag; /* field's tag */
441  short field_readcount; /* read count/TIFF_VARIABLE/TIFF_SPP */
442  short field_writecount; /* write count/TIFF_VARIABLE */
443  TIFFDataType field_type; /* type of associated data */
444  unsigned short field_bit; /* bit in fieldsset bit vector */
445  unsigned char field_oktochange; /* if true, can change while writing */
446  unsigned char field_passcount; /* if true, pass dir count on set */
447  char *field_name; /* ASCII name */
448 } TIFFFieldInfo;
449 
450 typedef struct _TIFFTagValue {
452  int count;
453  void *value;
455 
456 extern void TIFFMergeFieldInfo(TIFF*, const TIFFFieldInfo[], int);
458 extern const TIFFFieldInfo* TIFFFieldWithTag(TIFF*, ttag_t);
459 
462 typedef void (*TIFFPrintMethod)(TIFF*, FILE*, long);
463 
464 typedef struct {
465  TIFFVSetMethod vsetfield; /* tag set routine */
466  TIFFVGetMethod vgetfield; /* tag get routine */
467  TIFFPrintMethod printdir; /* directory print routine */
469 
471 extern void *TIFFGetClientInfo( TIFF *, const char * );
472 extern void TIFFSetClientInfo( TIFF *, void *, const char * );
473 
474 #if defined(__cplusplus)
475 }
476 #endif
477 #endif /* _TIFFIO_ */
#define name
#define Y0
Definition: dtl.h:159
#define Z0
Definition: dtl.h:165
static void
Definition: fpif.c:118
unsigned short uint16
Definition: tiff.h:62
#define ORIENTATION_BOTLEFT
Definition: tiff.h:205
TIFFIgnoreSense
Definition: tiff.h:74
unsigned long uint32
Definition: tiff.h:68
long int32
Definition: tiff.h:67
TIFFDataType
Definition: tiff.h:119
unsigned char uint8
Definition: tiff.h:60
tdata_t _TIFFmalloc(tsize_t)
Definition: tif_acorn.c:461
int TIFFGetFieldDefaulted(TIFF *, ttag_t,...)
Definition: tif_aux.c:194
uint32 TIFFCurrentDirOffset(TIFF *)
Definition: tif_dir.c:1140
int TIFFReadRGBAStrip(TIFF *, tstrip_t, uint32 *)
tsize_t(* TIFFReadWriteProc)(thandle_t, tdata_t, tsize_t)
Definition: tiffio.h:202
int TIFFGetField(TIFF *, ttag_t,...)
Definition: tif_dir.c:869
uint32 TIFFDefaultStripSize(TIFF *, uint32)
Definition: tif_strip.c:134
int TIFFReassignTagToIgnore(enum TIFFIgnoreSense, int)
Definition: tif_dir.c:1236
int TIFFVGetField(TIFF *, ttag_t, va_list)
Definition: tif_dir.c:887
tsize_t TIFFTileSize(TIFF *)
Definition: tif_tile.c:189
int32 tsize_t
Definition: tiffio.h:73
tsize_t TIFFReadEncodedStrip(TIFF *, tstrip_t, tdata_t, tsize_t)
Definition: tif_read.c:120
tsize_t TIFFTileRowSize(TIFF *)
Definition: tif_tile.c:134
tsize_t TIFFRasterScanlineSize(TIFF *)
Definition: tif_strip.c:180
uint32 TIFFCurrentRow(TIFF *)
Definition: tif_open.c:420
TIFF * TIFFClientOpen(const char *, const char *, thandle_t, TIFFReadWriteProc, TIFFReadWriteProc, TIFFSeekProc, TIFFCloseProc, TIFFSizeProc, TIFFMapFileProc, TIFFUnmapFileProc)
Definition: tif_open.c:125
void TIFFSwabArrayOfLong(uint32 *, unsigned long)
void(* tileSeparateRoutine)(TIFFRGBAImage *, uint32 *, uint32, uint32, uint32, uint32, int32, int32, unsigned char *, unsigned char *, unsigned char *, unsigned char *)
Definition: tiffio.h:128
tstrip_t TIFFComputeStrip(TIFF *, uint32, tsample_t)
Definition: tif_strip.c:38
int _TIFFmemcmp(const tdata_t, const tdata_t, tsize_t)
Definition: tif_acorn.c:491
int TIFFFlushData(TIFF *)
Definition: tif_flush.c:50
void(* TIFFUnmapFileProc)(thandle_t, tdata_t, toff_t)
Definition: tiffio.h:207
tstrip_t TIFFNumberOfStrips(TIFF *)
Definition: tif_strip.c:60
void TIFFSwabShort(uint16 *)
Definition: tif_swab.c:36
tsize_t TIFFReadTile(TIFF *, tdata_t, uint32, uint32, uint32, tsample_t)
Definition: tif_read.c:316
int TIFFGetMode(TIFF *)
Definition: tif_open.c:401
int TIFFReadRGBAImage(TIFF *, uint32, uint32, uint32 *, int)
Definition: tif_getimage.c:376
int TIFFReadScanline(TIFF *, tdata_t, uint32, tsample_t)
Definition: tif_read.c:95
void TIFFRGBAImageEnd(TIFFRGBAImage *)
Definition: tif_getimage.c:150
void TIFFSwabArrayOfShort(uint16 *, unsigned long)
tsize_t TIFFWriteEncodedTile(TIFF *, ttile_t, tdata_t, tsize_t)
Definition: tif_write.c:325
int TIFFSetSubDirectory(TIFF *, uint32)
Definition: tif_dir.c:1130
void(* TIFFErrorHandler)(const char *, const char *, va_list)
Definition: tiffio.h:201
unsigned char TIFFRGBValue
Definition: tiffio.h:112
void TIFFClose(TIFF *)
Definition: tif_close.c:33
const unsigned char * TIFFGetBitRevTable(int)
Definition: tif_swab.c:196
const char * TIFFFileName(TIFF *)
Definition: tif_open.c:383
tsize_t TIFFWriteRawTile(TIFF *, ttile_t, tdata_t, tsize_t)
Definition: tif_write.c:412
tdir_t TIFFNumberOfDirectories(TIFF *)
Definition: tif_dir.c:1089
ttile_t TIFFCurrentTile(TIFF *)
Definition: tif_open.c:447
uint32 ttag_t
Definition: tiffio.h:68
tstrip_t TIFFCurrentStrip(TIFF *)
Definition: tif_open.c:438
tsize_t TIFFScanlineSize(TIFF *)
Definition: tif_strip.c:162
void _TIFFfree(tdata_t)
Definition: tif_acorn.c:467
int TIFFIsUpSampled(TIFF *)
Definition: tif_open.c:465
int TIFFSetDirectory(TIFF *, tdir_t)
Definition: tif_dir.c:1104
int TIFFRGBAImageOK(TIFF *, char[1024])
Definition: tif_getimage.c:52
int TIFFVSetField(TIFF *, ttag_t, va_list)
Definition: tif_dir.c:584
void TIFFSetWriteOffset(TIFF *, toff_t)
Definition: tif_write.c:655
tsize_t TIFFWriteTile(TIFF *, tdata_t, uint32, uint32, uint32, tsample_t)
Definition: tif_write.c:297
uint32 ttile_t
Definition: tiffio.h:72
tsize_t TIFFVStripSize(TIFF *, uint32)
Definition: tif_strip.c:77
uint16 tsample_t
Definition: tiffio.h:70
int TIFFVGetFieldDefaulted(TIFF *, ttag_t, va_list)
Definition: tif_aux.c:79
int TIFFLastDirectory(TIFF *)
Definition: tif_dir.c:1150
int TIFFSetField(TIFF *, ttag_t,...)
Definition: tif_dir.c:566
TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler)
Definition: tif_error.c:33
tsize_t TIFFWriteRawStrip(TIFF *, tstrip_t, tdata_t, tsize_t)
Definition: tif_write.c:253
const TIFFCodec * TIFFFindCODEC(uint16)
Definition: tif_compress.c:182
tdir_t TIFFCurrentDirectory(TIFF *)
Definition: tif_open.c:429
int TIFFWriteDirectory(TIFF *)
Definition: tif_dirwrite.c:91
ttile_t TIFFComputeTile(TIFF *, uint32, uint32, uint32, tsample_t)
Definition: tif_tile.c:38
int TIFFIsTiled(TIFF *)
Definition: tif_open.c:411
void _TIFFmemcpy(tdata_t, const tdata_t, tsize_t)
Definition: tif_acorn.c:485
void TIFFPrintDirectory(TIFF *, FILE *, long)
Definition: tif_print.c:68
void TIFFSwabDouble(double *)
Definition: tif_swab.c:92
toff_t(* TIFFSizeProc)(thandle_t)
Definition: tiffio.h:205
tsize_t TIFFWriteEncodedStrip(TIFF *, tstrip_t, tdata_t, tsize_t)
Definition: tif_write.c:169
void TIFFWarning(const char *, const char *,...)
Definition: tif_warning.c:41
TIFFExtendProc TIFFSetTagExtender(TIFFExtendProc)
Definition: tif_dir.c:966
int TIFFReadRGBATile(TIFF *, uint32, uint32, uint32 *)
int TIFFWriteBufferSetup(TIFF *, tdata_t, tsize_t)
Definition: tif_write.c:523
void TIFFError(const char *, const char *,...)
Definition: tif_error.c:41
tsize_t TIFFReadRawTile(TIFF *, ttile_t, tdata_t, tsize_t)
Definition: tif_read.c:405
int TIFFIsByteSwapped(TIFF *)
Definition: tif_open.c:456
int TIFFRGBAImageGet(TIFFRGBAImage *, uint32 *, uint32, uint32)
Definition: tif_getimage.c:358
void TIFFReverseBits(unsigned char *, unsigned long)
TIFFCodec * TIFFRegisterCODEC(uint16, const char *, TIFFInitMethod)
Definition: tif_compress.c:197
int TIFFReadDirectory(TIFF *)
Definition: tif_dirread.c:79
void * tdata_t
Definition: tiffio.h:74
void(* TIFFExtendProc)(TIFF *)
Definition: tiffio.h:208
void(* tileContigRoutine)(TIFFRGBAImage *, uint32 *, uint32, uint32, uint32, uint32, int32, int32, unsigned char *)
Definition: tiffio.h:125
tsize_t TIFFReadRawStrip(TIFF *, tstrip_t, tdata_t, tsize_t)
Definition: tif_read.c:200
tdata_t _TIFFrealloc(tdata_t, tsize_t)
Definition: tif_acorn.c:473
int TIFFUnlinkDirectory(TIFF *, tdir_t)
Definition: tif_dir.c:1159
int TIFFReadBufferSetup(TIFF *, tdata_t, tsize_t)
Definition: tif_read.c:505
TIFF * TIFFOpen(const char *, const char *)
Definition: tif_acorn.c:438
int TIFFFlush(TIFF *)
Definition: tif_flush.c:33
int TIFFRGBAImageBegin(TIFFRGBAImage *, TIFF *, int, char[1024])
Definition: tif_getimage.c:180
int(* TIFFMapFileProc)(thandle_t, tdata_t *, toff_t *)
Definition: tiffio.h:206
void TIFFUnRegisterCODEC(TIFFCodec *)
Definition: tif_compress.c:218
int(* TIFFInitMethod)(TIFF *, int)
Definition: tiffio.h:188
const char * TIFFGetVersion(void)
Definition: tif_version.c:31
int32 toff_t
Definition: tiffio.h:75
void TIFFSwabArrayOfDouble(double *, unsigned long)
tsize_t TIFFVTileSize(TIFF *, uint32)
Definition: tif_tile.c:151
TIFF * TIFFFdOpen(int, const char *, const char *)
Definition: tif_acorn.c:418
int TIFFIsMSB2LSB(TIFF *)
Definition: tif_open.c:474
int TIFFWriteScanline(TIFF *, tdata_t, uint32, tsample_t)
Definition: tif_write.c:52
int TIFFCheckTile(TIFF *, uint32, uint32, uint32, tsample_t)
Definition: tif_tile.c:75
tsize_t TIFFStripSize(TIFF *)
Definition: tif_strip.c:118
uint32 tstrip_t
Definition: tiffio.h:71
int TIFFFileno(TIFF *)
Definition: tif_open.c:392
void _TIFFmemset(tdata_t, int, tsize_t)
Definition: tif_acorn.c:479
void TIFFDefaultTileSize(TIFF *, uint32 *, uint32 *)
Definition: tif_tile.c:201
void * thandle_t
Definition: tiffio.h:88
uint16 tdir_t
Definition: tiffio.h:69
TIFFErrorHandler TIFFSetWarningHandler(TIFFErrorHandler)
Definition: tif_warning.c:33
void TIFFSwabLong(uint32 *)
Definition: tif_swab.c:47
toff_t(* TIFFSeekProc)(thandle_t, toff_t, int)
Definition: tiffio.h:203
ttile_t TIFFNumberOfTiles(TIFF *)
Definition: tif_tile.c:107
tsize_t TIFFReadEncodedTile(TIFF *, ttile_t, tdata_t, tsize_t)
Definition: tif_read.c:330
int(* TIFFCloseProc)(thandle_t)
Definition: tiffio.h:204
#define uint32
Definition: unibasics.h:49
#define int32
Definition: unibasics.h:50
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d &reg2 endm macro vzip8 reg2 vzip d d &reg2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld init[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head pixblock_size cache_preload_simple process_pixblock_tail pixinterleave dst_w_basereg irp beq endif process_pixblock_tail_head tst beq irp if pixblock_size chunk_size tst beq pixld_src SRC pixld MASK if DST_R else pixld DST_R endif if src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head if pixblock_size cache_preload_simple endif process_pixblock_tail pixinterleave dst_w_basereg irp if pixblock_size chunk_size tst beq if DST_W else pixst DST_W else mov ORIG_W endif add lsl if lsl endif if lsl endif lsl endif lsl endif lsl endif subs mov DST_W if regs_shortage str endif bge start_of_loop_label endm macro generate_composite_function
float bstep
Definition: tiffio.h:162
TIFFDisplay display
Definition: tiffio.h:164
uint32 d_Vrwr
Definition: tiffio.h:139
float d_gammaG
Definition: tiffio.h:146
float d_YCB
Definition: tiffio.h:138
uint32 d_Vrwb
Definition: tiffio.h:141
float d_Y0R
Definition: tiffio.h:142
float d_gammaR
Definition: tiffio.h:145
float d_YCG
Definition: tiffio.h:137
float d_YCR
Definition: tiffio.h:136
float d_Y0G
Definition: tiffio.h:143
float d_Y0B
Definition: tiffio.h:144
float d_gammaB
Definition: tiffio.h:147
uint32 d_Vrwg
Definition: tiffio.h:140
unsigned char field_passcount
Definition: tiffio.h:446
unsigned char field_oktochange
Definition: tiffio.h:445
unsigned short field_bit
Definition: tiffio.h:444
TIFFVGetMethod vgetfield
Definition: tiffio.h:466
TIFFVSetMethod vsetfield
Definition: tiffio.h:465
TIFFPrintMethod printdir
Definition: tiffio.h:467
int32 * Y_tab
Definition: tiffio.h:156
int col_offset
Definition: tiffio.h:169
uint16 * redcmap
Definition: tiffio.h:153
uint16 samplesperpixel
Definition: tiffio.h:150
uint32 ** BWmap
Definition: tiffio.h:164
uint32 height
Definition: tiffio.h:148
uint16 * greencmap
Definition: tiffio.h:154
tileContigRoutine contig
Definition: tiffio.h:160
uint16 photometric
Definition: tiffio.h:152
uint32 ** PALmap
Definition: tiffio.h:165
uint16 req_orientation
Definition: tiffio.h:213
TIFFCIELabToRGB * cielab
Definition: tiffio.h:229
union _TIFFRGBAImage::@53 put
TIFFRGBValue * Map
Definition: tiffio.h:163
uint16 bitspersample
Definition: tiffio.h:149
uint16 orientation
Definition: tiffio.h:151
int(* get)(TIFFRGBAImage *, uint32 *, uint32, uint32)
Definition: tiffio.h:157
void(* any)(TIFFRGBAImage *)
Definition: tiffio.h:159
TIFF * tif
Definition: tiffio.h:143
uint16 * bluecmap
Definition: tiffio.h:155
TIFFYCbCrToRGB * ycbcr
Definition: tiffio.h:166
int isContig
Definition: tiffio.h:145
int row_offset
Definition: tiffio.h:168
int stoponerr
Definition: tiffio.h:144
tileSeparateRoutine separate
Definition: tiffio.h:161
uint32 width
Definition: tiffio.h:147
void * value
Definition: tiffio.h:453
const TIFFFieldInfo * info
Definition: tiffio.h:451
Definition: tiffiop.h:70
#define FILE
Definition: t1stdio.h:34
return() int(((double) *(font_tbl[cur_fnt].wtbl+(int)(*(font_tbl[cur_fnt].char_wi+(int)(ch - font_tbl[cur_fnt].char_f)% 256)))/(double)(1L<< 20)) *(double) font_tbl[cur_fnt].scale)
#define SGILOGENCODE_NODITHER
Definition: tiff.h:480
int TIFFRewriteDirectory(TIFF *)
int TIFFCreateDirectory(TIFF *)
Definition: tif_dir.c:1090
void LogLuv32toXYZ(uint32, float *)
int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB *, float *, float *)
Definition: tif_color.c:206
int(* TIFFVSetMethod)(TIFF *, ttag_t, va_list)
Definition: tiffio.h:460
void(* TIFFPrintMethod)(TIFF *, FILE *, long)
Definition: tiffio.h:462
int TIFFReadRGBAImageOriented(TIFF *, uint32, uint32, uint32 *, int, int)
Definition: tif_getimage.c:449
int LogL16fromY(double, int)
Definition: tif_luv.c:665
void LogLuv24toXYZ(uint32, float *)
void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *, uint32, int32, int32, uint32 *, uint32 *, uint32 *)
Definition: tif_color.c:177
int TIFFGetTagListCount(TIFF *)
Definition: tif_extension.c:36
struct _TIFFTagValue TIFFTagValue
double LogL16toY(int)
Definition: tif_luv.c:650
uint32 LogLuv24fromXYZ(float *, int)
double LogL10toY(int)
Definition: tif_luv.c:732
int TIFFDataWidth(TIFFDataType)
Definition: tif_dirinfo.c:346
int TIFFIsCODECConfigured(uint16)
Definition: tif_codec.c:135
int TIFFSetupStrips(TIFF *)
Definition: tif_write.c:446
const TIFFFieldInfo * TIFFFindFieldInfo(TIFF *, ttag_t, TIFFDataType)
Definition: tif_dirinfo.c:398
uint32 LogLuv32fromXYZ(float *, int)
int TIFFWriteCheck(TIFF *, int, const char *)
Definition: tif_write.c:486
int uv_decode(double *, double *, int)
Definition: tif_luv.c:836
int uv_encode(double, double, int)
Definition: tif_luv.c:814
void TIFFSetClientInfo(TIFF *, void *, const char *)
Definition: tif_extension.c:80
int TIFFCheckpointDirectory(TIFF *)
Definition: tif_dirwrite.c:425
void TIFFMergeFieldInfo(TIFF *, const TIFFFieldInfo[], int)
Definition: tif_dirinfo.c:299
TIFFTagMethods * TIFFAccessTagMethods(TIFF *)
Definition: tif_extension.c:60
#define CIELABTORGB_TABLE_RANGE
Definition: tiffio.h:161
void XYZtoRGB24(float *, uint8 *)
int(* TIFFVGetMethod)(TIFF *, ttag_t, va_list)
Definition: tiffio.h:461
void TIFFCIELabToXYZ(TIFFCIELabToRGB *, uint32, int32, int32, float *, float *, float *)
Definition: tif_color.c:46
void TIFFXYZToRGB(TIFFCIELabToRGB *, float, float, float, uint32 *, uint32 *, uint32 *)
Definition: tif_color.c:78
int LogL10fromY(double, int)
Definition: tif_luv.c:743
const TIFFFieldInfo * TIFFFieldWithTag(TIFF *, ttag_t)
Definition: tif_dirinfo.c:429
tsize_t TIFFRawStripSize(TIFF *, tstrip_t)
Definition: tif_strip.c:119
ttag_t TIFFGetTagListEntry(TIFF *, int tag_index)
Definition: tif_extension.c:44
int TIFFCIELabToRGBInit(TIFFCIELabToRGB *, TIFFDisplay *, float *)
Definition: tif_color.c:120
void * TIFFGetClientInfo(TIFF *, const char *)
Definition: tif_extension.c:66
char * va_list
Definition: varargs.h:22