42 static const char photoTag[] =
"PhotometricInterpretation";
47 #define FLIP_VERTICALLY 0x01 48 #define FLIP_HORIZONTALLY 0x02 56 { 3.2410F, -1.5374F, -0.4986F },
57 { -0.9692F, 1.8760F, 0.0416F },
58 { 0.0556F, -0.2040F, 1.0570F }
60 100.0F, 100.0F, 100.0F,
80 sprintf(emsg,
"Sorry, requested compression method is not configured");
84 case 1:
case 2:
case 4:
88 sprintf(emsg,
"Sorry, can not handle images with %d-bit samples",
94 switch (colorchannels) {
102 sprintf(emsg,
"Missing needed %s tag", photoTag);
106 switch (photometric) {
114 "Sorry, can not handle contiguous data with %s=%d, " 115 "and %s=%d and Bits/Sample=%d",
116 photoTag, photometric,
129 sprintf(emsg,
"Sorry, can not handle YCbCr images with %s=%d",
135 if (colorchannels < 3) {
136 sprintf(emsg,
"Sorry, can not handle RGB image with %s=%d",
137 "Color channels", colorchannels);
147 "Sorry, can not handle separated image with %s=%d",
153 "Sorry, can not handle separated image with %s=%d",
161 sprintf(emsg,
"Sorry, LogL data must have %s=%d",
169 sprintf(emsg,
"Sorry, LogLuv data must have %s=%d or %d",
174 sprintf(emsg,
"Sorry, can not handle LogLuv images with %s=%d",
182 sprintf(emsg,
"Sorry, can not handle image with %s=%d",
183 photoTag, photometric);
211 isCCITTCompression(
TIFF* tif)
229 uint16 *red_orig, *green_orig, *blue_orig;
244 case 1:
case 2:
case 4:
248 sprintf(emsg,
"Sorry, can not handle images with %d-bit samples",
255 &extrasamples, &sampleinfo);
256 if (extrasamples >= 1)
258 switch (sampleinfo[0]) {
265 img->
alpha = sampleinfo[0];
270 #ifdef DEFAULT_EXTRASAMPLE_AS_ALPHA 274 if( extrasamples == 0
287 switch (colorchannels) {
289 if (isCCITTCompression(tif))
298 sprintf(emsg,
"Missing needed %s tag", photoTag);
305 &red_orig, &green_orig, &blue_orig)) {
306 sprintf(emsg,
"Missing required \"Colormap\" tag");
316 sprintf(emsg,
"Out of memory for colormap copy");
331 "Sorry, can not handle contiguous data with %s=%d, " 332 "and %s=%d and Bits/Sample=%d",
341 sprintf(emsg,
"Sorry, can not handle YCbCr images with %s=%d",
342 "Planarconfiguration", planarconfig);
362 if (colorchannels < 3) {
363 sprintf(emsg,
"Sorry, can not handle RGB image with %s=%d",
364 "Color channels", colorchannels);
372 sprintf(emsg,
"Sorry, can not handle separated image with %s=%d",
377 sprintf(emsg,
"Sorry, can not handle separated image with %s=%d",
385 sprintf(emsg,
"Sorry, LogL data must have %s=%d",
395 sprintf(emsg,
"Sorry, LogLuv data must have %s=%d or %d",
400 sprintf(emsg,
"Sorry, can not handle LogLuv images with %s=%d",
401 "Planarconfiguration", planarconfig);
411 sprintf(emsg,
"Sorry, can not handle image with %s=%d",
427 if (!pickTileContigCase(img)) {
428 sprintf(emsg,
"Sorry, can not handle image");
433 if (!pickTileSeparateCase(img)) {
434 sprintf(emsg,
"Sorry, can not handle image");
450 "No \"put\" routine setupl; probably can not handle image format");
453 return (*img->
get)(
img, raster,
w,
h);
463 int orientation,
int stop)
465 char emsg[1024] =
"";
570 int32 fromskew, toskew;
583 flip = setorientation(img);
586 toskew = -(int32)(tw +
w);
590 toskew = -(int32)(tw -
w);
593 for (row = 0; row <
h; row += nrow)
595 rowstoread = th - (row + img->
row_offset) % th;
596 nrow = (row + rowstoread > h ? h -
row : rowstoread);
597 for (col = 0; col <
w; col += tw)
615 fromskew = tw - npix;
616 (*put)(
img, raster+y*w+col, col,
y,
617 npix, nrow, fromskew, toskew + fromskew, buf + pos);
621 (*put)(
img, raster+y*w+col, col,
y, tw, nrow, 0, toskew, buf + pos);
625 y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow);
632 for (line = 0; line <
h; line++) {
636 while ( left < right ) {
668 int32 fromskew, toskew;
689 flip = setorientation(img);
692 toskew = -(int32)(tw +
w);
696 toskew = -(int32)(tw -
w);
699 for (row = 0; row <
h; row += nrow)
701 rowstoread = th - (row + img->
row_offset) % th;
702 nrow = (row + rowstoread > h ? h -
row : rowstoread);
703 for (col = 0; col <
w; col += tw)
739 fromskew = tw - npix;
740 (*put)(
img, raster+y*w+col, col,
y,
741 npix, nrow, fromskew, toskew + fromskew,
742 r + pos, g + pos, b + pos, a + pos);
744 (*put)(
img, raster+y*w+col, col,
y,
745 tw, nrow, 0, toskew, r + pos, g + pos, b + pos, a + pos);
749 y += (flip & FLIP_VERTICALLY ?-(int32) nrow : (int32) nrow);
755 for (line = 0; line <
h; line++) {
759 while ( left < right ) {
789 int32 fromskew, toskew;
799 flip = setorientation(img);
802 toskew = -(int32)(
w +
w);
805 toskew = -(int32)(
w -
w);
810 fromskew = (
w < imagewidth ? imagewidth -
w : 0);
811 for (row = 0; row <
h; row += nrow)
813 rowstoread = rowsperstrip - (row + img->
row_offset) % rowsperstrip;
814 nrow = (row + rowstoread > h ? h -
row : rowstoread);
818 ((row + img->
row_offset)%rowsperstrip + nrow) * scanline) < 0
825 pos = ((row + img->
row_offset) % rowsperstrip) * scanline;
826 (*put)(
img, raster+y*
w, 0,
y,
w, nrow, fromskew, toskew, buf + pos);
827 y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow);
833 for (line = 0; line <
h; line++) {
837 while ( left < right ) {
862 unsigned char *
r, *
g, *
b, *
a;
866 uint32 rowsperstrip, offset_row;
869 int32 fromskew, toskew;
874 r = buf = (
unsigned char *)
_TIFFmalloc(4*stripsize);
886 flip = setorientation(img);
889 toskew = -(int32)(
w +
w);
893 toskew = -(int32)(
w -
w);
898 fromskew = (
w < imagewidth ? imagewidth -
w : 0);
899 for (row = 0; row <
h; row += nrow)
901 rowstoread = rowsperstrip - (row + img->
row_offset) % rowsperstrip;
902 nrow = (row + rowstoread > h ? h -
row : rowstoread);
905 r, ((row + img->
row_offset)%rowsperstrip + nrow) * scanline) < 0
912 g, ((row + img->
row_offset)%rowsperstrip + nrow) * scanline) < 0
919 b, ((row + img->
row_offset)%rowsperstrip + nrow) * scanline) < 0
927 a, ((row + img->
row_offset)%rowsperstrip + nrow) * scanline) < 0
934 pos = ((row + img->
row_offset) % rowsperstrip) * scanline;
935 (*put)(
img, raster+y*
w, 0,
y,
w, nrow, fromskew, toskew, r + pos, g + pos,
937 y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow);
943 for (line = 0; line <
h; line++) {
947 while ( left < right ) {
970 #define REPEAT8(op) REPEAT4(op); REPEAT4(op) 971 #define REPEAT4(op) REPEAT2(op); REPEAT2(op) 972 #define REPEAT2(op) op; op 973 #define CASE8(x,op) \ 975 case 7: op; case 6: op; case 5: op; \ 976 case 4: op; case 3: op; case 2: op; \ 979 #define CASE4(x,op) switch (x) { case 3: op; case 2: op; case 1: op; } 982 #define UNROLL8(w, op1, op2) { \ 984 for (_x = w; _x >= 8; _x -= 8) { \ 993 #define UNROLL4(w, op1, op2) { \ 995 for (_x = w; _x >= 4; _x -= 4) { \ 1004 #define UNROLL2(w, op1, op2) { \ 1006 for (_x = w; _x >= 2; _x -= 2) { \ 1016 #define SKEW(r,g,b,skew) { r += skew; g += skew; b += skew; } 1017 #define SKEW4(r,g,b,a,skew) { r += skew; g += skew; b += skew; a+= skew; } 1019 #define A1 (((uint32)0xffL)<<24) 1020 #define PACK(r,g,b) \ 1021 ((uint32)(r)|((uint32)(g)<<8)|((uint32)(b)<<16)|A1) 1022 #define PACK4(r,g,b,a) \ 1023 ((uint32)(r)|((uint32)(g)<<8)|((uint32)(b)<<16)|((uint32)(a)<<24)) 1024 #define W2B(v) (((v)>>8)&0xff) 1025 #define PACKW(r,g,b) \ 1026 ((uint32)W2B(r)|((uint32)W2B(g)<<8)|((uint32)W2B(b)<<16)|A1) 1027 #define PACKW4(r,g,b,a) \ 1028 ((uint32)W2B(r)|((uint32)W2B(g)<<8)|((uint32)W2B(b)<<16)|((uint32)W2B(a)<<24)) 1030 #define DECLAREContigPutFunc(name) \ 1032 TIFFRGBAImage* img, \ 1034 uint32 x, uint32 y, \ 1035 uint32 w, uint32 h, \ 1036 int32 fromskew, int32 toskew, \ 1050 for (
x =
w;
x-- > 0;)
1052 *cp++ = PALmap[*pp][0];
1053 pp += samplesperpixel;
1071 UNROLL2(
w, bw = PALmap[*pp++], *cp++ = *bw++);
1088 UNROLL4(
w, bw = PALmap[*pp++], *cp++ = *bw++);
1105 UNROLL8(
w, bw = PALmap[*pp++], *cp++ = *bw++);
1121 for (
x =
w;
x-- > 0;)
1123 *cp++ = BWmap[*pp][0];
1124 pp += samplesperpixel;
1143 for (
x =
w;
x-- > 0;)
1147 *cp++ = BWmap[*wp >> 8][0];
1148 pp += 2 * samplesperpixel;
1149 wp += samplesperpixel;
1167 UNROLL8(
w, bw = BWmap[*pp++], *cp++ = *bw++);
1184 UNROLL4(
w, bw = BWmap[*pp++], *cp++ = *bw++);
1201 UNROLL2(
w, bw = BWmap[*pp++], *cp++ = *bw++);
1215 fromskew *= samplesperpixel;
1218 *cp++ =
PACK(pp[0], pp[1], pp[2]);
1219 pp += samplesperpixel);
1234 fromskew *= samplesperpixel;
1236 for (
x =
w;
x-- > 0;) {
1237 *cp++ =
PACK(Map[pp[0]], Map[pp[1]], Map[pp[2]]);
1238 pp += samplesperpixel;
1254 fromskew *= samplesperpixel;
1257 *cp++ =
PACK4(pp[0], pp[1], pp[2], pp[3]);
1258 pp += samplesperpixel);
1273 fromskew *= samplesperpixel;
1276 for (
x =
w;
x-- > 0;) {
1278 r = (pp[0] *
a) / 255;
1279 g = (pp[1] *
a) / 255;
1280 b = (pp[2] *
a) / 255;
1281 *cp++ =
PACK4(r,g,b,a);
1282 pp += samplesperpixel;
1298 fromskew *= samplesperpixel;
1300 for (
x =
w;
x-- > 0;) {
1301 *cp++ =
PACKW(wp[0], wp[1], wp[2]);
1302 wp += samplesperpixel;
1319 fromskew *= samplesperpixel;
1321 for (
x =
w;
x-- > 0;) {
1322 *cp++ =
PACKW4(wp[0], wp[1], wp[2], wp[3]);
1323 wp += samplesperpixel;
1340 fromskew *= samplesperpixel;
1351 for (
x =
w;
x-- > 0;) {
1353 r = (wp[0] *
a) / 0x10eff;
1354 g = (wp[1] *
a) / 0x10eff;
1355 b = (wp[2] *
a) / 0x10eff;
1356 *cp++ =
PACK4(r,g,b,a);
1357 wp += samplesperpixel;
1375 fromskew *= samplesperpixel;
1379 r = (k*(255-pp[0]))/255;
1380 g = (k*(255-pp[1]))/255;
1381 b = (k*(255-pp[2]))/255;
1382 *cp++ =
PACK(r, g, b);
1383 pp += samplesperpixel);
1401 fromskew *= samplesperpixel;
1403 for (
x =
w;
x-- > 0;) {
1405 r = (k*(255-pp[0]))/255;
1406 g = (k*(255-pp[1]))/255;
1407 b = (k*(255-pp[2]))/255;
1408 *cp++ =
PACK(Map[r], Map[g], Map[b]);
1409 pp += samplesperpixel;
1416 #define DECLARESepPutFunc(name) \ 1418 TIFFRGBAImage* img,\ 1420 uint32 x, uint32 y, \ 1421 uint32 w, uint32 h,\ 1422 int32 fromskew, int32 toskew,\ 1423 unsigned char* r, unsigned char* g, unsigned char* b, unsigned char* a\ 1448 for (
x =
w;
x > 0;
x--)
1449 *cp++ =
PACK(Map[*
r++], Map[*
g++], Map[*
b++]);
1476 for (
x =
w;
x-- > 0;) {
1478 rv = (*
r++ * av) / 255;
1479 gv = (*
g++ * av) / 255;
1480 bv = (*
b++ * av) / 255;
1481 *cp++ =
PACK4(rv,gv,bv,av);
1499 for (
x = 0;
x <
w;
x++)
1500 *cp++ =
PACKW(*wr++, *wg++, *wb++);
1501 SKEW(wr, wg, wb, fromskew);
1518 for (
x = 0;
x <
w;
x++)
1519 *cp++ =
PACKW4(*wr++, *wg++, *wb++, *wa++);
1520 SKEW4(wr, wg, wb, wa, fromskew);
1546 for (
x =
w;
x-- > 0;) {
1548 r = (*wr++ *
a) / 0x10eff;
1549 g = (*wg++ *
a) / 0x10eff;
1550 b = (*wb++ *
a) / 0x10eff;
1551 *cp++ =
PACK4(r,g,b,a);
1553 SKEW4(wr, wg, wb, wa, fromskew);
1568 for (
x =
w;
x-- > 0;) {
1570 (
unsigned char)pp[0],
1575 *cp++ =
PACK(r, g, b);
1587 #define YCbCrtoRGB(dst, Y) { \ 1589 TIFFYCbCrtoRGB(img->ycbcr, (Y), Cb, Cr, &r, &g, &b); \ 1590 dst = PACK(r, g, b); \ 1602 static void putcontig8bitYCbCrGenericTile(
1607 int32 fromskew, int32 toskew,
1613 uint32* cp1 = cp+w+toskew;
1614 uint32* cp2 = cp1+w+toskew;
1615 uint32* cp3 = cp2+w+toskew;
1616 int32 incr = 3*w+4*toskew;
1618 int group_size = v_group * h_group + 2;
1621 fromskew = (fromskew * group_size) / h_group;
1623 for( yy = 0; yy <
h; yy++ )
1625 unsigned char *pp_line;
1626 int y_line_group = yy / v_group;
1627 int y_remainder = yy - y_line_group * v_group;
1629 pp_line = pp + v_line_group *
1632 for( xx = 0; xx <
w; xx++ )
1637 for (; h >= 4; h -= 4) {
1660 cp += 4, cp1 += 4, cp2 += 4, cp3 += 4;
1663 cp += incr, cp1 += incr, cp2 += incr, cp3 += incr;
1677 int32 incr = 3*
w+4*toskew;
1681 fromskew = (fromskew * 18) / 4;
1682 if ((
h & 3) == 0 && (
w & 3) == 0) {
1683 for (;
h >= 4;
h -= 4) {
1706 cp += 4, cp1 += 4, cp2 += 4, cp3 += 4;
1709 cp += incr, cp1 += incr, cp2 += incr, cp3 += incr;
1714 for (
x =
w;
x > 0;) {
1748 cp +=
x; cp1 +=
x; cp2 +=
x; cp3 +=
x;
1752 cp += 4; cp1 += 4; cp2 += 4; cp3 += 4;
1760 cp += incr, cp1 += incr, cp2 += incr, cp3 += incr;
1772 int32 incr = 2*toskew+
w;
1775 fromskew = (fromskew * 10) / 4;
1776 if ((
h & 3) == 0 && (w & 1) == 0) {
1777 for (;
h >= 2;
h -= 2) {
1795 cp += incr, cp1 += incr;
1800 for (
x = w;
x > 0;) {
1838 cp += incr, cp1 += incr;
1894 int32 incr = 2*toskew+
w;
1897 fromskew = (fromskew * 6) / 2;
1898 if ((
h & 1) == 0 && (w & 1) == 0) {
1899 for (;
h >= 2;
h -= 2) {
1913 cp += incr, cp1 += incr;
1918 for (
x = w;
x > 0;) {
1946 cp += incr, cp1 += incr;
1958 fromskew = (fromskew * 4) / 2;
2014 static char module[] =
"initCIELabConversion";
2016 float *luma, *refBlackWhite;
2023 + 2*256*
sizeof (
int)
2024 + 3*256*
sizeof (int32)
2028 "No space for YCbCr->RGB conversion state");
2047 switch ((hs<<4)|vs) {
2048 case 0x44:
return (putcontig8bitYCbCr44tile);
2049 case 0x42:
return (putcontig8bitYCbCr42tile);
2050 case 0x41:
return (putcontig8bitYCbCr41tile);
2051 case 0x22:
return (putcontig8bitYCbCr22tile);
2052 case 0x21:
return (putcontig8bitYCbCr21tile);
2053 case 0x11:
return (putcontig8bitYCbCr11tile);
2062 static char module[] =
"initCIELabConversion";
2072 "No space for CIE L*a*b*->RGB conversion state.");
2078 refWhite[1] = 100.0F;
2079 refWhite[0] = whitePoint[0] / whitePoint[1] * refWhite[1];
2080 refWhite[2] = (1.0F - whitePoint[0] - whitePoint[1])
2081 / whitePoint[1] * refWhite[1];
2084 "Failed to initialize CIE L*a*b*->RGB conversion state.");
2089 return putcontig8bitCIELab;
2104 int nsamples = 8 / bitspersample;
2118 for (i = 0; i < 256; i++) {
2121 switch (bitspersample) {
2122 #define GREY(x) c = Map[x]; *p++ = PACK(c,c,c); 2167 range = (int32) 255;
2172 "No space for photometric conversion table");
2176 for (x = 0; x <=
range; x++)
2179 for (x = 0; x <=
range; x++)
2189 if (!makebwmap(img))
2206 if (*r++ >= 256 || *g++ >= 256 || *b++ >= 256)
2220 #define CVT(x) ((uint16)((x)>>8)) 2239 int nsamples = 8 / bitspersample;
2253 for (i = 0; i < 256; i++) {
2256 #define CMAP(x) c = (TIFFRGBValue) x; *p++ = PACK(r[c]&0xff, g[c]&0xff, b[c]&0xff); 2257 switch (bitspersample) {
2311 if (checkcmap(img) == 16)
2334 if (buildMap(img)) {
2341 put = putRGBAAcontig8bittile;
2343 put = putRGBUAcontig8bittile;
2345 put = putRGBcontig8bittile;
2347 put = putRGBcontig8bitMaptile;
2350 put = putRGBcontig16bittile;
2353 put = putRGBAAcontig16bittile;
2355 put = putRGBUAcontig16bittile;
2363 put = putRGBcontig8bitCMYKtile;
2365 put = putRGBcontig8bitCMYKMaptile;
2370 case 8: put = put8bitcmaptile;
break;
2371 case 4: put = put4bitcmaptile;
break;
2372 case 2: put = put2bitcmaptile;
break;
2373 case 1: put = put1bitcmaptile;
break;
2379 case 16: put = put16bitbwtile;
break;
2380 case 8: put = putgreytile;
break;
2381 case 4: put = put4bitbwtile;
break;
2382 case 2: put = put2bitbwtile;
break;
2383 case 1: put = put1bitbwtile;
break;
2388 put = initYCbCrConversion(img);
2392 put = initCIELabConversion(img);
2410 if (buildMap(img)) {
2417 put = putRGBAAseparate8bittile;
2419 put = putRGBUAseparate8bittile;
2421 put = putRGBseparate8bittile;
2423 put = putRGBseparate8bitMaptile;
2426 put = putRGBseparate16bittile;
2429 put = putRGBAAseparate16bittile;
2431 put = putRGBUAseparate16bittile;
2453 char emsg[1024] =
"";
2456 uint32 rowsperstrip, rows_to_read;
2461 "Can't use TIFFReadRGBAStrip() with tiled file.");
2466 if( (row % rowsperstrip) != 0 )
2469 "Row passed to TIFFReadRGBAStrip() must be first in a strip.");
2478 if( row + rowsperstrip > img.
height )
2481 rows_to_read = rowsperstrip;
2504 char emsg[1024] =
"";
2507 uint32 tile_xsize, tile_ysize;
2508 uint32 read_xsize, read_ysize;
2519 "Can't use TIFFReadRGBATile() with stripped file.");
2525 if( (col % tile_xsize) != 0 || (row % tile_ysize) != 0 )
2528 "Row/col passed to TIFFReadRGBATile() must be top" 2529 "left corner of a tile.");
2550 if( row + tile_ysize > img.
height )
2553 read_ysize = tile_ysize;
2555 if( col + tile_xsize > img.
width )
2556 read_xsize = img.
width - col;
2558 read_xsize = tile_xsize;
2579 if( read_xsize == tile_xsize && read_ysize == tile_ysize )
2582 for( i_row = 0; i_row < read_ysize; i_row++ ) {
2583 memmove( raster + (tile_ysize - i_row - 1) * tile_xsize,
2584 raster + (read_ysize - i_row - 1) * read_xsize,
2585 read_xsize *
sizeof(
uint32) );
2586 _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize+read_xsize,
2587 0,
sizeof(
uint32) * (tile_xsize - read_xsize) );
2590 for( i_row = read_ysize; i_row < tile_ysize; i_row++ ) {
2591 _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize,
2592 0,
sizeof(
uint32) * tile_xsize );
#define DECLARESepPutFunc(name)
tsize_t TIFFTileRowSize(TIFF *tif)
#define SKEW(r, g, b, skew)
#define DECLAREContigPutFunc(name)
void TIFFXYZToRGB(TIFFCIELabToRGB *cielab, float X, float Y, float Z, uint32 *r, uint32 *g, uint32 *b)
#define PACKW4(r, g, b, a)
#define PHOTOMETRIC_YCBCR
#define UNROLL8(w, op1, op2)
GLboolean GLboolean GLboolean GLboolean a
#define TIFFTAG_BITSPERSAMPLE
void TIFFWarningExt(thandle_t fd, const char *module, const char *fmt,...)
#define UNROLL2(w, op1, op2)
#define TIFFTAG_ROWSPERSTRIP
#define PHOTOMETRIC_SEPARATED
GLint GLint GLint GLint GLint GLint y
#define TIFFTAG_EXTRASAMPLES
#define TIFFTAG_ORIENTATION
#define PHOTOMETRIC_CIELAB
#define TIFFTAG_IMAGEWIDTH
GLfloat GLfloat GLfloat GLfloat h
#define COMPRESSION_CCITTFAX3
#define COMPRESSION_SGILOG24
int TIFFCIELabToRGBInit(TIFFCIELabToRGB *cielab, TIFFDisplay *display, float *refWhite)
#define TIFFTAG_SGILOGDATAFMT
tsize_t TIFFScanlineSize(TIFF *tif)
#define PHOTOMETRIC_LOGLUV
#define ORIENTATION_RIGHTTOP
#define COMPRESSION_CCITTRLE
#define COMPRESSION_OJPEG
#define TIFFTAG_YCBCRSUBSAMPLING
GLint GLint GLint GLint GLint x
unsigned char TIFFRGBValue
#define TIFFTAG_REFERENCEBLACKWHITE
#define TIFFTAG_PLANARCONFIG
#define ORIENTATION_TOPLEFT
typedef void(APIENTRY *GLDEBUGPROCARB)(GLenum source
void(* tileContigRoutine)(TIFFRGBAImage *, uint32 *, uint32, uint32, uint32, uint32, int32, int32, unsigned char *)
#define TIFFTAG_JPEGCOLORMODE
GLboolean GLboolean GLboolean b
int TIFFReadRGBATile(TIFF *tif, uint32 col, uint32 row, uint32 *raster)
#define TIFFTAG_YCBCRCOEFFICIENTS
int TIFFRGBAImageBegin(TIFFRGBAImage *img, TIFF *tif, int stop, char emsg[1024])
void _TIFFmemcpy(tdata_t d, const tdata_t s, tsize_t c)
GLenum GLuint GLenum GLsizei const GLchar * buf
#define JPEGCOLORMODE_RGB
#define ORIENTATION_RIGHTBOT
#define FLIP_HORIZONTALLY
#define TIFFTAG_TILEWIDTH
GLenum GLenum GLvoid * row
#define COMPRESSION_CCITTFAX4
#define TIFFTAG_TILELENGTH
#define PHOTOMETRIC_MINISWHITE
#define SKEW4(r, g, b, a, skew)
#define TIFFTAG_IMAGELENGTH
#define TIFFTAG_SAMPLESPERPIXEL
#define PHOTOMETRIC_PALETTE
#define ORIENTATION_LEFTTOP
void TIFFRGBAImageEnd(TIFFRGBAImage *img)
#define PHOTOMETRIC_MINISBLACK
#define COMPRESSION_CCITTRLEW
GLdouble GLdouble GLdouble r
tstrip_t TIFFComputeStrip(TIFF *tif, uint32 row, tsample_t sample)
void TIFFCIELabToXYZ(TIFFCIELabToRGB *cielab, uint32 l, int32 a, int32 b, float *X, float *Y, float *Z)
int TIFFRGBAImageGet(TIFFRGBAImage *img, uint32 *raster, uint32 w, uint32 h)
#define UNROLL4(w, op1, op2)
int TIFFGetFieldDefaulted(TIFF *tif, ttag_t tag,...)
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
#define TIFFTAG_PHOTOMETRIC
#define EXTRASAMPLE_UNASSALPHA
#define TIFFroundup(x, y)
int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB *ycbcr, float *luma, float *refBlackWhite)
#define TIFFTAG_WHITEPOINT
#define ORIENTATION_TOPRIGHT
#define COMPRESSION_SGILOG
#define TIFFTAG_COMPRESSION
#define PLANARCONFIG_SEPARATE
void _TIFFmemset(tdata_t p, int v, tsize_t c)
int(* get)(TIFFRGBAImage *, uint32 *, uint32, uint32)
#define SGILOGDATAFMT_8BIT
int TIFFRGBAImageOK(TIFF *tif, char emsg[1024])
uint16 td_samplesperpixel
int TIFFReadRGBAImage(TIFF *tif, uint32 rwidth, uint32 rheight, uint32 *raster, int stop)
int TIFFReadRGBAImageOriented(TIFF *tif, uint32 rwidth, uint32 rheight, uint32 *raster, int orientation, int stop)
GLubyte GLubyte GLubyte GLubyte w
int ZEXPORT compress(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)
tsize_t TIFFTileSize(TIFF *tif)
tileSeparateRoutine separate
#define EXTRASAMPLE_UNSPECIFIED
#define YCbCrtoRGB(dst, Y)
tsize_t TIFFReadEncodedStrip(TIFF *tif, tstrip_t strip, tdata_t buf, tsize_t size)
const char * TIFFFileName(TIFF *tif)
int TIFFSetField(TIFF *tif, ttag_t tag,...)
void * _TIFFmalloc(tsize_t s)
tsize_t TIFFStripSize(TIFF *tif)
void(* tileSeparateRoutine)(TIFFRGBAImage *, uint32 *, uint32, uint32, uint32, uint32, int32, int32, unsigned char *, unsigned char *, unsigned char *, unsigned char *)
int TIFFIsTiled(TIFF *tif)
#define PACK4(r, g, b, a)
int TIFFGetField(TIFF *tif, ttag_t tag,...)
GLfloat GLfloat GLfloat alpha
void _TIFFfree(tdata_t p)
#define EXTRASAMPLE_ASSOCALPHA
union _TIFFRGBAImage::@37 put
void(* any)(TIFFRGBAImage *)
#define ORIENTATION_LEFTBOT
#define ORIENTATION_BOTLEFT
#define ORIENTATION_BOTRIGHT
tsize_t TIFFReadTile(TIFF *tif, tdata_t buf, uint32 x, uint32 y, uint32 z, tsample_t s)
int TIFFReadRGBAStrip(TIFF *tif, uint32 row, uint32 *raster)
#define PLANARCONFIG_CONTIG