roentgen b75cab
typedef struct _TIFFImageIter TIFFImageIter;
roentgen b75cab
roentgen b75cab
/* The callback function is called for each "block" of image pixel data after
roentgen b75cab
   it has been read from the file and decoded. This image pixel data is in the
roentgen b75cab
   buffer pp, and this data represents the image pixels from (x,y) to
roentgen b75cab
   (x+w,y+h). It is stored in pixel format, so each pixel contains
roentgen b75cab
   img->samplesperpixel consecutive samples each containing img->bitspersample
roentgen b75cab
   bits of data. The array pp is ordered in h consecutive rows of w+fromskew
roentgen b75cab
   pixels each. */
roentgen b75cab
typedef void (*ImageIterTileContigRoutine)
roentgen b75cab
    (TIFFImageIter*, void *, uint32, uint32, uint32, uint32, int32,
roentgen b75cab
	unsigned char*);
roentgen b75cab
#define	DECLAREContigCallbackFunc(name) \
roentgen b75cab
static void name(\
roentgen b75cab
    TIFFImageIter* img, \
roentgen b75cab
    void* user_data, \
roentgen b75cab
    uint32 x, uint32 y, \
roentgen b75cab
    uint32 w, uint32 h, \
roentgen b75cab
    int32 fromskew, \
roentgen b75cab
    u_char* pp \
roentgen b75cab
)
roentgen b75cab
roentgen b75cab
typedef void (*ImageIterTileSeparateRoutine)
roentgen b75cab
    (TIFFImageIter*, void *, uint32, uint32, uint32, uint32, int32,
roentgen b75cab
	unsigned char*, unsigned char*, unsigned char*, unsigned char*);
roentgen b75cab
#define	DECLARESepCallbackFunc(name) \
roentgen b75cab
static void name(\
roentgen b75cab
    TIFFImageIter* img, \
roentgen b75cab
    void* user_data, \
roentgen b75cab
    uint32 x, uint32 y, \
roentgen b75cab
    uint32 w, uint32 h,\
roentgen b75cab
    int32 fromskew, \
roentgen b75cab
    u_char* r, u_char* g, u_char* b, u_char* a\
roentgen b75cab
)
roentgen b75cab
roentgen b75cab
struct _TIFFImageIter {
roentgen b75cab
	TIFF*	tif;				/* image handle */
roentgen b75cab
	int	stoponerr;			/* stop on read error */
roentgen b75cab
	int	isContig;			/* data is packed/separate */
roentgen b75cab
	int	alpha;				/* type of alpha data present */
roentgen b75cab
	uint32	width;				/* image width */
roentgen b75cab
	uint32	height;				/* image height */
roentgen b75cab
	uint16	bitspersample;			/* image bits/sample */
roentgen b75cab
	uint16	samplesperpixel;		/* image samples/pixel */
roentgen b75cab
	uint16	orientation;			/* image orientation */
roentgen b75cab
	uint16	photometric;			/* image photometric interp */
roentgen b75cab
	uint16*	redcmap;			/* colormap pallete */
roentgen b75cab
	uint16*	greencmap;
roentgen b75cab
	uint16*	bluecmap;
roentgen b75cab
						/* get image data routine */
roentgen b75cab
	int	(*get)(TIFFImageIter*, void *udata, uint32, uint32);
roentgen b75cab
	union {
roentgen b75cab
	    void (*any)(TIFFImageIter*);
roentgen b75cab
	    ImageIterTileContigRoutine		contig;
roentgen b75cab
	    ImageIterTileSeparateRoutine	separate;
roentgen b75cab
	} callback;				/* fn to exec for each block */
roentgen b75cab
};
roentgen b75cab
/*
roentgen b75cab
 * Local Variables:
roentgen b75cab
 * mode: c
roentgen b75cab
 * c-basic-offset: 8
roentgen b75cab
 * fill-column: 78
roentgen b75cab
 * End:
roentgen b75cab
 */