Blame contrib/pds/tif_imageiter.h

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