1 typedef struct _TIFFImageIter TIFFImageIter;
2 
3 /* The callback function is called for each "block" of image pixel data after
4    it has been read from the file and decoded. This image pixel data is in the
5    buffer pp, and this data represents the image pixels from (x,y) to
6    (x+w,y+h). It is stored in pixel format, so each pixel contains
7    img->samplesperpixel consecutive samples each containing img->bitspersample
8    bits of data. The array pp is ordered in h consecutive rows of w+fromskew
9    pixels each. */
10 typedef void (*ImageIterTileContigRoutine)
11     (TIFFImageIter*, void *, uint32_t, uint32_t, uint32_t, uint32_t, int32_t,
12 	unsigned char*);
13 #define	DECLAREContigCallbackFunc(name) \
14 static void name(\
15     TIFFImageIter* img, \
16     void* user_data, \
17     uint32_t x, uint32_t y, \
18     uint32_t w, uint32_t h, \
19     int32_t fromskew, \
20     u_char* pp \
21 )
22 
23 typedef void (*ImageIterTileSeparateRoutine)
24     (TIFFImageIter*, void *, uint32_t, uint32_t, uint32_t, uint32_t, int32_t,
25 	unsigned char*, unsigned char*, unsigned char*, unsigned char*);
26 #define	DECLARESepCallbackFunc(name) \
27 static void name(\
28     TIFFImageIter* img, \
29     void* user_data, \
30     uint32_t x, uint32_t y, \
31     uint32_t w, uint32_t h,\
32     int32_t fromskew, \
33     u_char* r, u_char* g, u_char* b, u_char* a\
34 )
35 
36 struct _TIFFImageIter {
37 	TIFF*	tif;				/* image handle */
38 	int	stoponerr;			/* stop on read error */
39 	int	isContig;			/* data is packed/separate */
40 	int	alpha;				/* type of alpha data present */
41 	uint32_t	width;				/* image width */
42 	uint32_t	height;				/* image height */
43 	uint16_t	bitspersample;			/* image bits/sample */
44 	uint16_t	samplesperpixel;		/* image samples/pixel */
45 	uint16_t	orientation;			/* image orientation */
46 	uint16_t	photometric;			/* image photometric interp */
47 	uint16_t*	redcmap;			/* colormap palette */
48 	uint16_t*	greencmap;
49 	uint16_t*	bluecmap;
50 						/* get image data routine */
51 	int	(*get)(TIFFImageIter*, void *udata, uint32_t, uint32_t);
52 	union {
53 	    void (*any)(TIFFImageIter*);
54 	    ImageIterTileContigRoutine		contig;
55 	    ImageIterTileSeparateRoutine	separate;
56 	} callback;				/* fn to exec for each block */
57 };
58 /*
59  * Local Variables:
60  * mode: c
61  * c-basic-offset: 8
62  * fill-column: 78
63  * End:
64  */
65