44static const char photoTag[] =
"PhotometricInterpretation";
49#define FLIP_VERTICALLY 0x01
50#define FLIP_HORIZONTALLY 0x02
52#define EMSG_BUF_SIZE 1024
60 {3.2410F, -1.5374F, -0.4986F},
61 {-0.9692F, 1.8760F, 0.0416F},
62 {0.0556F, -0.2040F, 1.0570F}},
92 "Sorry, requested compression method is not configured");
105 "Sorry, can not handle images with %" PRIu16
114 "Sorry, can not handle images with IEEE floating-point samples");
120 switch (colorchannels)
144 "Sorry, can not handle contiguous data with %s=%" PRIu16
147 photoTag, photometric,
"Samples/pixel",
166 if (colorchannels < 3)
169 "Sorry, can not handle RGB image with %s=%d",
170 "Color channels", colorchannels);
181 "Sorry, can not handle separated image with %s=%d",
189 "Sorry, can not handle separated image with %s=%" PRIu16,
199 "Sorry, LogL data must have %s=%d",
"Compression",
209 "Sorry, LogLuv data must have %s=%d or %d",
217 "Sorry, can not handle LogLuv images with %s=%" PRIu16,
224 "Sorry, can not handle image with %s=%" PRIu16
227 "colorchannels", colorchannels);
236 "Sorry, can not handle image with %s=%" PRIu16
237 ", %s=%d and %s=%" PRIu16,
239 "colorchannels", colorchannels,
"Bits/sample",
285 if (
img->Bitdepth16To8)
318 uint16_t *red_orig, *green_orig, *blue_orig;
340 img->stoponerr = stop;
342 switch (
img->bitspersample)
352 "Sorry, can not handle images with %" PRIu16
361 if (extrasamples >= 1)
363 switch (sampleinfo[0])
367 if (
img->samplesperpixel >
373 img->alpha = sampleinfo[0];
378#ifdef DEFAULT_EXTRASAMPLE_AS_ALPHA
382 if (extrasamples == 0 &&
img->samplesperpixel == 4 &&
390 colorchannels =
img->samplesperpixel - extrasamples;
395 switch (colorchannels)
412 switch (
img->photometric)
419 "Missing required \"Colormap\" tag");
424 n_color = (1U <<
img->bitspersample);
431 if (!
img->redcmap || !
img->greencmap || !
img->bluecmap)
434 "Out of memory for colormap copy");
446 img->samplesperpixel != 1 &&
img->bitspersample < 8)
450 "Sorry, can not handle contiguous data with %s=%" PRIu16
454 img->samplesperpixel,
img->bitspersample);
488 if (colorchannels < 3)
491 "Sorry, can not handle RGB image with %s=%d",
492 "Color channels", colorchannels);
504 "Sorry, can not handle separated image with %s=%" PRIu16,
508 if (
img->samplesperpixel < 4)
512 "Sorry, can not handle separated image with %s=%" PRIu16,
513 "Samples/pixel",
img->samplesperpixel);
522 "Sorry, LogL data must have %s=%d",
"Compression",
528 img->bitspersample = 8;
535 "Sorry, LogLuv data must have %s=%d or %d",
543 "Sorry, can not handle LogLuv images with %s=%" PRIu16,
544 "Planarconfiguration", planarconfig);
549 img->bitspersample = 8;
593 "No \"get\" routine setup");
600 "No \"put\" routine setupl; probably can not handle image format");
619 "Error in TIFFRGBAImageGet: row offset %d exceeds "
621 img->row_offset,
img->height);
624 return (*
img->get)(
img, raster,
w,
h);
632 uint32_t *raster,
int orientation,
int stop)
665 switch (
img->orientation)
743 int32_t this_toskew, leftmost_toskew;
759 "Error in gtTileContig: column offset %d exceeds "
761 img->col_offset,
img->width);
780 "unsupported tile size (too wide)");
791 "unsupported tile size (too wide)");
798 if (tw == 0 || th == 0)
807 leftmost_fromskew =
img->col_offset % tw;
808 leftmost_tw = tw - leftmost_fromskew;
816 leftmost_toskew = (
int32_t)skew_i64;
819 rowstoread = th - (
row +
img->row_offset) % th;
820 nrow = (
row + rowstoread >
h ?
h -
row : rowstoread);
821 fromskew = leftmost_fromskew;
822 this_tw = leftmost_tw;
823 this_toskew = leftmost_toskew;
825 col =
img->col_offset;
839 if (tocol + this_tw > wmin)
844 fromskew = tw - (wmin - tocol);
845 this_tw = tw - fromskew;
846 this_toskew = toskew + fromskew;
849 (*put)(
img, raster + roffset, tocol,
y, this_tw, nrow, fromskew,
859 this_toskew = toskew;
906 unsigned char *p0 =
NULL;
907 unsigned char *p1 =
NULL;
908 unsigned char *p2 =
NULL;
918 int32_t this_toskew, leftmost_toskew;
932 "Error in gtTileSeparate: column offset %d exceeds "
934 img->col_offset,
img->width);
955 "unsupported tile size (too wide)");
966 "unsupported tile size (too wide)");
973 switch (
img->photometric)
986 if (tw == 0 || th == 0)
995 leftmost_fromskew =
img->col_offset % tw;
996 leftmost_tw = tw - leftmost_fromskew;
1004 leftmost_toskew = (
int32_t)skew_i64;
1007 rowstoread = th - (
row +
img->row_offset) % th;
1008 nrow = (
row + rowstoread >
h ?
h -
row : rowstoread);
1009 fromskew = leftmost_fromskew;
1010 this_tw = leftmost_tw;
1011 this_toskew = leftmost_toskew;
1013 col =
img->col_offset;
1015 while (tocol < wmin)
1020 col,
row +
img->row_offset, 0,
1028 if (colorchannels == 1)
1047 if (colorchannels > 1 &&
1055 if (colorchannels > 1 &&
1065 colorchannels) == (
tmsize_t)(-1) &&
1076 if (tocol + this_tw > wmin)
1081 fromskew = tw - (wmin - tocol);
1082 this_tw = tw - fromskew;
1083 this_toskew = toskew + fromskew;
1086 (*put)(
img, raster + roffset, tocol,
y, this_tw, nrow, fromskew,
1087 this_toskew, p0 +
pos, p1 +
pos, p2 +
pos,
1097 this_toskew = toskew;
1144 uint16_t subsamplinghor, subsamplingver;
1156 if (0 <=
img->col_offset && (
uint32_t)
img->col_offset < imagewidth)
1163 "Error in gtStripContig: column offset %d exceeds "
1165 img->col_offset, imagewidth);
1171 if (subsamplingver == 0)
1174 "Invalid vertical YCbCr subsampling");
1202 if (rowsperstrip == 0)
1209 fromskew = (
w < imagewidth ? imagewidth -
w : 0);
1213 rowstoread = rowsperstrip - (
row +
img->row_offset) % rowsperstrip;
1214 nrow = (
row + rowstoread >
h ?
h -
row : rowstoread);
1216 if ((nrowsub % subsamplingver) != 0)
1217 nrowsub += subsamplingver - nrowsub % subsamplingver;
1218 temp = (
row +
img->row_offset) % rowsperstrip + nrowsub;
1222 "Integer overflow in gtStripContig");
1227 (
void **)(&
buf), maxstripsize,
1235 pos = ((
row +
img->row_offset) % rowsperstrip) * scanline +
1238 (*put)(
img, raster + roffset, 0,
y, wmin, nrow, fromskew, toskew,
1301 if (0 <=
img->col_offset && (
uint32_t)
img->col_offset < imagewidth)
1308 "Error in gtStripSeparate: column offset %d exceeds "
1310 img->col_offset, imagewidth);
1343 switch (
img->photometric)
1357 if (rowsperstrip == 0)
1364 fromskew = (
w < imagewidth ? imagewidth -
w : 0);
1368 rowstoread = rowsperstrip - (
row +
img->row_offset) % rowsperstrip;
1369 nrow = (
row + rowstoread >
h ?
h -
row : rowstoread);
1370 offset_row =
row +
img->row_offset;
1371 temp = (
row +
img->row_offset) % rowsperstrip + nrow;
1375 "Integer overflow in gtStripSeparate");
1389 if (colorchannels == 1)
1396 p1 = p0 + stripsize;
1397 p2 = p1 + stripsize;
1408 if (colorchannels > 1 &&
1416 if (colorchannels > 1 &&
1438 pos = ((
row +
img->row_offset) % rowsperstrip) * scanline +
1441 (*put)(
img, raster + roffset, 0,
y, wmin, nrow, fromskew, toskew,
1482#define REPEAT8(op) \
1485#define REPEAT4(op) \
1488#define REPEAT2(op) \
1491#define CASE8(x, op) \
1509#define CASE4(x, op) \
1521#define UNROLL8(w, op1, op2) \
1524 for (_x = w; _x >= 8; _x -= 8) \
1535#define UNROLL4(w, op1, op2) \
1538 for (_x = w; _x >= 4; _x -= 4) \
1549#define UNROLL2(w, op1, op2) \
1552 for (_x = w; _x >= 2; _x -= 2) \
1564#define SKEW(r, g, b, skew) \
1570#define SKEW4(r, g, b, a, skew) \
1578#define A1 (((uint32_t)0xffL) << 24)
1579#define PACK(r, g, b) \
1580 ((uint32_t)(r) | ((uint32_t)(g) << 8) | ((uint32_t)(b) << 16) | A1)
1581#define PACK4(r, g, b, a) \
1582 ((uint32_t)(r) | ((uint32_t)(g) << 8) | ((uint32_t)(b) << 16) | \
1583 ((uint32_t)(a) << 24))
1584#define W2B(v) (((v) >> 8) & 0xff)
1586#define PACKW(r, g, b) \
1587 ((uint32_t)W2B(r) | ((uint32_t)W2B(g) << 8) | ((uint32_t)W2B(b) << 16) | A1)
1588#define PACKW4(r, g, b, a) \
1589 ((uint32_t)W2B(r) | ((uint32_t)W2B(g) << 8) | ((uint32_t)W2B(b) << 16) | \
1590 ((uint32_t)W2B(a) << 24))
1592#define DECLAREContigPutFunc(name) \
1593 static void name(TIFFRGBAImage *img, uint32_t *cp, uint32_t x, uint32_t y, \
1594 uint32_t w, uint32_t h, int32_t fromskew, int32_t toskew, \
1603 int samplesperpixel =
img->samplesperpixel;
1608 for (
x =
w;
x > 0; --
x)
1610 *
cp++ = PALmap[*pp][0];
1611 pp += samplesperpixel;
1680 int samplesperpixel =
img->samplesperpixel;
1686 for (
x =
w;
x > 0; --
x)
1688 *
cp++ = BWmap[*pp][0];
1689 pp += samplesperpixel;
1701 int samplesperpixel =
img->samplesperpixel;
1707 for (
x =
w;
x > 0; --
x)
1709 *
cp++ = BWmap[*pp][0] & ((
uint32_t) * (pp + 1) << 24 | ~A1);
1710 pp += samplesperpixel;
1722 int samplesperpixel =
img->samplesperpixel;
1730 for (
x =
w;
x > 0; --
x)
1734 *
cp++ = BWmap[*wp >> 8][0];
1735 pp += 2 * samplesperpixel;
1736 wp += samplesperpixel;
1805 int samplesperpixel =
img->samplesperpixel;
1809 fromskew *= samplesperpixel;
1813 pp += samplesperpixel);
1825 int samplesperpixel =
img->samplesperpixel;
1829 fromskew *= samplesperpixel;
1833 pp += samplesperpixel);
1845 int samplesperpixel =
img->samplesperpixel;
1847 fromskew *= samplesperpixel;
1852 for (
x =
w;
x > 0; --
x)
1860 pp += samplesperpixel;
1872 int samplesperpixel =
img->samplesperpixel;
1875 fromskew *= samplesperpixel;
1878 for (
x =
w;
x > 0; --
x)
1880 *
cp++ =
PACK(
img->Bitdepth16To8[wp[0]],
img->Bitdepth16To8[wp[1]],
1881 img->Bitdepth16To8[wp[2]]);
1882 wp += samplesperpixel;
1895 int samplesperpixel =
img->samplesperpixel;
1898 fromskew *= samplesperpixel;
1901 for (
x =
w;
x > 0; --
x)
1903 *
cp++ =
PACK4(
img->Bitdepth16To8[wp[0]],
img->Bitdepth16To8[wp[1]],
1904 img->Bitdepth16To8[wp[2]],
img->Bitdepth16To8[wp[3]]);
1905 wp += samplesperpixel;
1918 int samplesperpixel =
img->samplesperpixel;
1921 fromskew *= samplesperpixel;
1926 for (
x =
w;
x > 0; --
x)
1928 a =
img->Bitdepth16To8[wp[3]];
1930 r =
m[
img->Bitdepth16To8[wp[0]]];
1931 g =
m[
img->Bitdepth16To8[wp[1]]];
1932 b =
m[
img->Bitdepth16To8[wp[2]]];
1934 wp += samplesperpixel;
1948 int samplesperpixel =
img->samplesperpixel;
1953 fromskew *= samplesperpixel;
1957 g = (
k * (255 - pp[1])) / 255;
b = (
k * (255 - pp[2])) / 255;
1958 *
cp++ =
PACK(
r,
g,
b); pp += samplesperpixel);
1971 int samplesperpixel =
img->samplesperpixel;
1976 fromskew *= samplesperpixel;
1979 for (
x =
w;
x > 0; --
x)
1982 r = (
k * (255 - pp[0])) / 255;
1983 g = (
k * (255 - pp[1])) / 255;
1984 b = (
k * (255 - pp[2])) / 255;
1986 pp += samplesperpixel;
1993#define DECLARESepPutFunc(name) \
1994 static void name(TIFFRGBAImage *img, uint32_t *cp, uint32_t x, uint32_t y, \
1995 uint32_t w, uint32_t h, int32_t fromskew, int32_t toskew, \
1996 unsigned char *r, unsigned char *g, unsigned char *b, \
2042 for (
x =
w;
x > 0; --
x)
2045 rv = (kv * (255 - *
r++)) / 255;
2046 gv = (kv * (255 - *
g++)) / 255;
2047 bv = (kv * (255 - *
b++)) / 255;
2048 *
cp++ =
PACK4(rv, gv, bv, 255);
2066 for (
x =
w;
x > 0; --
x)
2073 *
cp++ =
PACK4(rv, gv, bv, av);
2093 for (
x = 0;
x <
w;
x++)
2094 *
cp++ =
PACK(
img->Bitdepth16To8[*wr++],
img->Bitdepth16To8[*wg++],
2095 img->Bitdepth16To8[*wb++]);
2096 SKEW(wr, wg, wb, fromskew);
2114 for (
x = 0;
x <
w;
x++)
2115 *
cp++ =
PACK4(
img->Bitdepth16To8[*wr++],
img->Bitdepth16To8[*wg++],
2116 img->Bitdepth16To8[*wb++],
img->Bitdepth16To8[*wa++]);
2117 SKEW4(wr, wg, wb, wa, fromskew);
2137 for (
x =
w;
x > 0; --
x)
2139 a2 =
img->Bitdepth16To8[*wa++];
2141 r2 =
m[
img->Bitdepth16To8[*wr++]];
2142 g2 =
m[
img->Bitdepth16To8[*wg++]];
2143 b2 =
m[
img->Bitdepth16To8[*wb++]];
2146 SKEW4(wr, wg, wb, wa, fromskew);
2162 for (
x =
w;
x > 0; --
x)
2165 (
signed char)pp[1], (
signed char)pp[2], &
X, &
Y, &
Z);
2187 for (
x =
w;
x > 0; --
x)
2204#define YCbCrtoRGB(dst, Y) \
2207 TIFFYCbCrtoRGB(img->ycbcr, (Y), Cb, Cr, &r, &g, &b); \
2208 dst = PACK(r, g, b); \
2223 fromskew = (fromskew / 4) * (4 * 2 + 2);
2224 if ((
h & 3) == 0 && (
w & 3) == 0)
2226 for (;
h >= 4;
h -= 4)
2362 fromskew = (fromskew / 4) * (4 * 2 + 2);
2363 if ((
w & 3) == 0 && (
h & 1) == 0)
2365 for (;
h >= 2;
h -= 2)
2464 fromskew = (fromskew / 4) * (4 * 1 + 2);
2517 fromskew = (fromskew / 2) * (2 * 2 + 2);
2518 cp2 =
cp +
w + toskew;
2579 fromskew = (fromskew / 2) * (2 * 1 + 2);
2620 fromskew = (fromskew / 1) * (1 * 2 + 2);
2621 cp2 =
cp +
w + toskew;
2660 fromskew = (fromskew / 1) * (1 * 1 + 2);
2694 *
cp++ =
PACK(dr, dg, db);
2704 return f > (
float)(-0x7FFFFFFF + 128) &&
f < (
float)0x7FFFFFFF;
2709 static const char module[] =
"initYCbCrConversion";
2711 float *luma, *refBlackWhite;
2718 2 * 256 *
sizeof(
int) + 3 * 256 *
sizeof(
int32_t));
2722 "No space for YCbCr->RGB conversion state");
2733 if (luma[0] != luma[0] || luma[1] != luma[1] || luma[1] == 0.0 ||
2737 "Invalid values for YCbCrCoefficients tag");
2749 "Invalid values for ReferenceBlackWhite tag");
2760 static const char module[] =
"initCIELabConversion";
2766 if (whitePoint[1] == 0.0f)
2779 "No space for CIE L*a*b*->RGB conversion state.");
2784 refWhite[1] = 100.0F;
2785 refWhite[0] = whitePoint[0] / whitePoint[1] * refWhite[1];
2787 (1.0F - whitePoint[0] - whitePoint[1]) / whitePoint[1] * refWhite[1];
2791 "Failed to initialize CIE L*a*b*->RGB conversion state.");
2796 if (
img->bitspersample == 8)
2797 return putcontig8bitCIELab8;
2798 else if (
img->bitspersample == 16)
2799 return putcontig8bitCIELab16;
2813 int bitspersample =
img->bitspersample;
2814 int nsamples = 8 / bitspersample;
2827 "No space for B&W mapping table");
2831 for (
i = 0;
i < 256;
i++)
2835 switch (bitspersample)
2839 *p++ = PACK(c, c, c);
2882 if (
img->bitspersample == 16)
2890 "No space for photometric conversion table");
2903 if (
img->bitspersample <= 16 &&
2925 long n = 1L <<
img->bitspersample;
2928 if (*
r++ >= 256 || *
g++ >= 256 || *
b++ >= 256)
2940 for (
i = (1L <<
img->bitspersample) - 1;
i >= 0;
i--)
2942#define CVT(x) ((uint16_t)((x) >> 8))
2959 int bitspersample =
img->bitspersample;
2960 int nsamples = 8 / bitspersample;
2973 "No space for Palette mapping table");
2977 for (
i = 0;
i < 256;
i++)
2982 c = (TIFFRGBValue)x; \
2983 *p++ = PACK(r[c] & 0xff, g[c] & 0xff, b[c] & 0xff);
2984 switch (bitspersample)
3021 switch (
img->photometric)
3026 if (
img->bitspersample == 8)
3043 "Assuming 8-bit colormap");
3062 switch (
img->photometric)
3065 switch (
img->bitspersample)
3069 img->samplesperpixel >= 4)
3070 img->put.contig = putRGBAAcontig8bittile;
3072 img->samplesperpixel >= 4)
3075 img->put.contig = putRGBUAcontig8bittile;
3077 else if (
img->samplesperpixel >= 3)
3078 img->put.contig = putRGBcontig8bittile;
3082 img->samplesperpixel >= 4)
3085 img->put.contig = putRGBAAcontig16bittile;
3088 img->samplesperpixel >= 4)
3091 img->put.contig = putRGBUAcontig16bittile;
3093 else if (
img->samplesperpixel >= 3)
3096 img->put.contig = putRGBcontig16bittile;
3104 if (
img->bitspersample == 8)
3107 img->put.contig = putRGBcontig8bitCMYKtile;
3109 img->put.contig = putRGBcontig8bitCMYKMaptile;
3116 switch (
img->bitspersample)
3119 img->put.contig = put8bitcmaptile;
3122 img->put.contig = put4bitcmaptile;
3125 img->put.contig = put2bitcmaptile;
3128 img->put.contig = put1bitcmaptile;
3137 switch (
img->bitspersample)
3140 img->put.contig = put16bitbwtile;
3143 if (
img->alpha &&
img->samplesperpixel == 2)
3144 img->put.contig = putagreytile;
3146 img->put.contig = putgreytile;
3149 img->put.contig = put4bitbwtile;
3152 img->put.contig = put2bitbwtile;
3155 img->put.contig = put1bitbwtile;
3161 if ((
img->bitspersample == 8) && (
img->samplesperpixel == 3))
3177 &SubsamplingHor, &SubsamplingVer);
3178 switch ((SubsamplingHor << 4) | SubsamplingVer)
3181 img->put.contig = putcontig8bitYCbCr44tile;
3184 img->put.contig = putcontig8bitYCbCr42tile;
3187 img->put.contig = putcontig8bitYCbCr41tile;
3190 img->put.contig = putcontig8bitYCbCr22tile;
3193 img->put.contig = putcontig8bitYCbCr21tile;
3196 img->put.contig = putcontig8bitYCbCr12tile;
3199 img->put.contig = putcontig8bitYCbCr11tile;
3208 if (
img->bitspersample == 8 ||
img->bitspersample == 16)
3226 switch (
img->photometric)
3233 switch (
img->bitspersample)
3237 img->put.separate = putRGBAAseparate8bittile;
3241 img->put.separate = putRGBUAseparate8bittile;
3244 img->put.separate = putRGBseparate8bittile;
3250 img->put.separate = putRGBAAseparate16bittile;
3255 img->put.separate = putRGBUAseparate16bittile;
3260 img->put.separate = putRGBseparate16bittile;
3266 if (
img->bitspersample == 8 &&
img->samplesperpixel == 4)
3270 img->put.separate = putCMYKseparate8bittile;
3274 if ((
img->bitspersample == 8) && (
img->samplesperpixel == 3))
3281 switch ((hs << 4) |
vs)
3284 img->put.separate = putseparate8bitYCbCr11tile;
3297 static const char module[] =
"BuildMapUaToAa";
3308 for (na = 0; na < 256; na++)
3310 for (nv = 0; nv < 256; nv++)
3311 *
m++ = (
uint8_t)((nv * na + 127) / 255);
3318 static const char module[] =
"BuildMapBitdepth16To8";
3323 if (
img->Bitdepth16To8 ==
NULL)
3328 m =
img->Bitdepth16To8;
3329 for (
n = 0;
n < 65536;
n++)
3354 uint32_t rowsperstrip, rows_to_read;
3359 "Can't use TIFFReadRGBAStrip() with tiled file.");
3365 if (rowsperstrip == 0)
3371 if ((
row % rowsperstrip) != 0)
3375 "Row passed to TIFFReadRGBAStrip() must be first in a strip.");
3384 "Invalid row passed to TIFFReadRGBAStrip().");
3392 if (
row + rowsperstrip >
img.height)
3393 rows_to_read =
img.height -
row;
3395 rows_to_read = rowsperstrip;
3440 "Can't use TIFFReadRGBATile() with striped file.");
3446 if (tile_xsize == 0 || tile_ysize == 0)
3449 "tile_xsize or tile_ysize is zero");
3453 if ((col % tile_xsize) != 0 || (
row % tile_ysize) != 0)
3456 "Row/col passed to TIFFReadRGBATile() must be top"
3457 "left corner of a tile.");
3471 if (col >=
img.width ||
row >=
img.height)
3474 "Invalid row/col passed to TIFFReadRGBATile().");
3486 if (
row + tile_ysize >
img.height)
3487 read_ysize =
img.height -
row;
3489 read_ysize = tile_ysize;
3491 if (col + tile_xsize >
img.width)
3492 read_xsize =
img.width - col;
3494 read_xsize = tile_xsize;
3501 img.col_offset = col;
3515 if (read_xsize == tile_xsize && read_ysize == tile_ysize)
3518 for (i_row = 0; i_row < read_ysize; i_row++)
3520 memmove(raster + (
size_t)(tile_ysize - i_row - 1) * tile_xsize,
3521 raster + (
size_t)(read_ysize - i_row - 1) * read_xsize,
3523 _TIFFmemset(raster + (
size_t)(tile_ysize - i_row - 1) * tile_xsize +
3525 0,
sizeof(
uint32_t) * (tile_xsize - read_xsize));
3528 for (i_row = read_ysize; i_row < tile_ysize; i_row++)
3530 _TIFFmemset(raster + (
size_t)(tile_ysize - i_row - 1) * tile_xsize, 0,
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
GLint GLint GLint GLint GLint x
GLclampf GLclampf GLclampf alpha
GLint GLint GLint GLint GLint GLint y
GLdouble GLdouble GLdouble r
GLboolean GLboolean GLboolean b
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum GLuint GLsizei bufsize
GLboolean GLboolean GLboolean GLboolean a
GLubyte GLubyte GLubyte GLubyte w
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define memmove(s1, s2, n)
static const struct update_accum a2
static CRYPT_DATA_BLOB b2[]
static float(__cdecl *square_half_float)(float x
int ZEXPORT compress(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)
uint16_t td_bitspersample
uint16_t td_samplesperpixel
int TIFFGetFieldDefaulted(TIFF *tif, uint32_t tag,...)
tmsize_t _TIFFMultiplySSize(TIFF *tif, tmsize_t first, tmsize_t second, const char *where)
void TIFFCIELabToXYZ(TIFFCIELabToRGB *cielab, uint32_t l, int32_t a, int32_t b, float *X, float *Y, float *Z)
void TIFFCIELab16ToXYZ(TIFFCIELabToRGB *cielab, uint32_t l, int32_t a, int32_t b, float *X, float *Y, float *Z)
void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *ycbcr, uint32_t Y, int32_t Cb, int32_t Cr, uint32_t *r, uint32_t *g, uint32_t *b)
int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB *ycbcr, float *luma, float *refBlackWhite)
int TIFFCIELabToRGBInit(TIFFCIELabToRGB *cielab, const TIFFDisplay *display, float *refWhite)
void TIFFXYZToRGB(TIFFCIELabToRGB *cielab, float X, float Y, float Z, uint32_t *r, uint32_t *g, uint32_t *b)
int TIFFSetField(TIFF *tif, uint32_t tag,...)
int TIFFGetField(TIFF *tif, uint32_t tag,...)
void TIFFErrorExtR(TIFF *tif, const char *module, const char *fmt,...)
static int gtTileSeparate(TIFFRGBAImage *, uint32_t *, uint32_t, uint32_t)
static int isInRefBlackWhiteRange(float f)
#define SKEW4(r, g, b, a, skew)
static const TIFFDisplay display_sRGB
static int gtStripContig(TIFFRGBAImage *, uint32_t *, uint32_t, uint32_t)
int TIFFReadRGBAImage(TIFF *tif, uint32_t rwidth, uint32_t rheight, uint32_t *raster, int stop)
#define UNROLL8(w, op1, op2)
int TIFFReadRGBAStrip(TIFF *tif, uint32_t row, uint32_t *raster)
static int gtStripSeparate(TIFFRGBAImage *, uint32_t *, uint32_t, uint32_t)
static int setupMap(TIFFRGBAImage *img)
static int setorientation(TIFFRGBAImage *img)
#define YCbCrtoRGB(dst, Y)
int TIFFReadRGBATile(TIFF *tif, uint32_t col, uint32_t row, uint32_t *raster)
static int buildMap(TIFFRGBAImage *img)
int TIFFRGBAImageGet(TIFFRGBAImage *img, uint32_t *raster, uint32_t w, uint32_t h)
#define PACK4(r, g, b, a)
#define UNROLL4(w, op1, op2)
static int PickContigCase(TIFFRGBAImage *)
static tileContigRoutine initCIELabConversion(TIFFRGBAImage *img)
#define DECLAREContigPutFunc(name)
static int gtTileContig(TIFFRGBAImage *, uint32_t *, uint32_t, uint32_t)
static int isCCITTCompression(TIFF *tif)
void TIFFRGBAImageEnd(TIFFRGBAImage *img)
int TIFFReadRGBAStripExt(TIFF *tif, uint32_t row, uint32_t *raster, int stop_on_error)
#define SKEW(r, g, b, skew)
static int makebwmap(TIFFRGBAImage *img)
int TIFFReadRGBATileExt(TIFF *tif, uint32_t col, uint32_t row, uint32_t *raster, int stop_on_error)
static int initYCbCrConversion(TIFFRGBAImage *img)
static int BuildMapUaToAa(TIFFRGBAImage *img)
static void cvtcmap(TIFFRGBAImage *img)
#define UNROLL2(w, op1, op2)
static int checkcmap(TIFFRGBAImage *img)
#define FLIP_HORIZONTALLY
static int makecmap(TIFFRGBAImage *img)
#define DECLARESepPutFunc(name)
static int BuildMapBitdepth16To8(TIFFRGBAImage *img)
int TIFFRGBAImageOK(TIFF *tif, char emsg[EMSG_BUF_SIZE])
int TIFFReadRGBAImageOriented(TIFF *tif, uint32_t rwidth, uint32_t rheight, uint32_t *raster, int orientation, int stop)
int TIFFRGBAImageBegin(TIFFRGBAImage *img, TIFF *tif, int stop, char emsg[EMSG_BUF_SIZE])
static int PickSeparateCase(TIFFRGBAImage *)
static const char photoTag[]
void _TIFFfreeExt(TIFF *tif, void *p)
const char * TIFFFileName(TIFF *tif)
int TIFFIsTiled(TIFF *tif)
void * _TIFFmallocExt(TIFF *tif, tmsize_t s)
tmsize_t _TIFFReadEncodedStripAndAllocBuffer(TIFF *tif, uint32_t strip, void **buf, tmsize_t bufsizetoalloc, tmsize_t size_to_read)
tmsize_t _TIFFReadTileAndAllocBuffer(TIFF *tif, void **buf, tmsize_t bufsizetoalloc, uint32_t x, uint32_t y, uint32_t z, uint16_t s)
tmsize_t TIFFReadEncodedStrip(TIFF *tif, uint32_t strip, void *buf, tmsize_t size)
tmsize_t TIFFReadTile(TIFF *tif, void *buf, uint32_t x, uint32_t y, uint32_t z, uint16_t s)
tmsize_t TIFFStripSize(TIFF *tif)
tmsize_t TIFFScanlineSize(TIFF *tif)
uint32_t TIFFComputeStrip(TIFF *tif, uint32_t row, uint16_t sample)
tmsize_t TIFFTileSize(TIFF *tif)
tmsize_t TIFFTileRowSize(TIFF *tif)
void _TIFFmemset(void *p, int v, tmsize_t c)
void _TIFFmemcpy(void *d, const void *s, tmsize_t c)
void TIFFWarningExtR(TIFF *tif, const char *module, const char *fmt,...)
#define TIFFTAG_BITSPERSAMPLE
#define ORIENTATION_BOTRIGHT
#define PLANARCONFIG_SEPARATE
#define ORIENTATION_LEFTTOP
#define ORIENTATION_BOTLEFT
#define TIFFTAG_WHITEPOINT
#define EXTRASAMPLE_UNASSALPHA
#define COMPRESSION_CCITTFAX3
#define COMPRESSION_CCITTRLE
#define EXTRASAMPLE_ASSOCALPHA
#define ORIENTATION_TOPLEFT
#define ORIENTATION_RIGHTBOT
#define ORIENTATION_RIGHTTOP
#define TIFFTAG_SAMPLESPERPIXEL
#define COMPRESSION_SGILOG
#define COMPRESSION_CCITTRLEW
#define PHOTOMETRIC_CIELAB
#define EXTRASAMPLE_UNSPECIFIED
#define TIFFTAG_PHOTOMETRIC
#define TIFFTAG_TILELENGTH
#define PHOTOMETRIC_PALETTE
#define TIFFTAG_EXTRASAMPLES
#define TIFFTAG_IMAGEWIDTH
#define PHOTOMETRIC_SEPARATED
#define TIFFTAG_YCBCRCOEFFICIENTS
#define TIFFTAG_ORIENTATION
#define PHOTOMETRIC_LOGLUV
#define SAMPLEFORMAT_IEEEFP
#define PHOTOMETRIC_YCBCR
#define SGILOGDATAFMT_8BIT
#define ORIENTATION_TOPRIGHT
#define PHOTOMETRIC_MINISWHITE
#define TIFFTAG_YCBCRSUBSAMPLING
#define TIFFTAG_SGILOGDATAFMT
#define TIFFTAG_ROWSPERSTRIP
#define ORIENTATION_LEFTBOT
#define COMPRESSION_SGILOG24
#define TIFFTAG_REFERENCEBLACKWHITE
#define TIFFTAG_TILEWIDTH
#define TIFFTAG_IMAGELENGTH
#define TIFFTAG_COMPRESSION
#define PHOTOMETRIC_MINISBLACK
#define TIFFTAG_PLANARCONFIG
#define COMPRESSION_CCITTFAX4
#define TIFFTAG_JPEGCOLORMODE
#define JPEGCOLORMODE_RGB
#define PLANARCONFIG_CONTIG
unsigned char TIFFRGBValue
void(* tileSeparateRoutine)(TIFFRGBAImage *, uint32_t *, uint32_t, uint32_t, uint32_t, uint32_t, int32_t, int32_t, unsigned char *, unsigned char *, unsigned char *, unsigned char *)
void(* tileContigRoutine)(TIFFRGBAImage *, uint32_t *, uint32_t, uint32_t, uint32_t, uint32_t, int32_t, int32_t, unsigned char *)
#define TIFF_TMSIZE_T_MAX
#define TIFFroundup_32(x, y)