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