Pillow/libImaging/TiffDecode.h

61 lines
1.2 KiB
C
Raw Normal View History

/*
* The Python Imaging Library.
* $Id: //modules/pil/libImaging/Tiff.h#1 $
*
* declarations for the LibTiff-based Group3 and Group4 decoder
*
*/
#ifndef _TIFFIO_
#include <tiffio.h>
#endif
#ifndef _TIFF_
#include <tiff.h>
#endif
2014-03-19 21:06:33 +04:00
/* UNDONE -- what are we using from this? */
/*#ifndef _UNISTD_H
# include <unistd.h>
# endif
*/
2013-03-15 00:25:23 +04:00
#ifndef min
#define min(x,y) (( x > y ) ? y : x )
#define max(x,y) (( x < y ) ? y : x )
#endif
#ifndef _PIL_LIBTIFF_
#define _PIL_LIBTIFF_
typedef struct {
tdata_t data; /* tdata_t == void* */
toff_t loc; /* toff_t == uint32 */
tsize_t size; /* tsize_t == int32 */
int fp;
int ifd; /* offset of the ifd, used for multipage */
TIFF *tiff; /* Used in write */
toff_t eof;
int flrealloc; /* may we realloc */
} TIFFSTATE;
extern int ImagingLibTiffInit(ImagingCodecState state, int fp, int offset);
extern int ImagingLibTiffEncodeInit(ImagingCodecState state, char *filename, int fp);
extern int ImagingLibTiffSetField(ImagingCodecState state, ttag_t tag, ...);
/*
Trace debugging
legacy, don't enable for python 3.x, unicode issues.
*/
2013-03-15 01:38:49 +04:00
/*
#define VA_ARGS(...) __VA_ARGS__
#define TRACE(args) fprintf(stderr, VA_ARGS args)
2013-03-15 01:38:49 +04:00
*/
#define TRACE(args)
#endif