diff options
Diffstat (limited to 'Build/source/libs/gd/libgd-src/src/gd_tiff.c')
-rw-r--r-- | Build/source/libs/gd/libgd-src/src/gd_tiff.c | 48 |
1 files changed, 44 insertions, 4 deletions
diff --git a/Build/source/libs/gd/libgd-src/src/gd_tiff.c b/Build/source/libs/gd/libgd-src/src/gd_tiff.c index ae65ed7d5e2..4020a6f7054 100644 --- a/Build/source/libs/gd/libgd-src/src/gd_tiff.c +++ b/Build/source/libs/gd/libgd-src/src/gd_tiff.c @@ -27,7 +27,6 @@ ---------------------------------------------------------------------------- */ -/* $Id$ */ /** * File: TIFF IO @@ -790,7 +789,7 @@ static int createFromTiffRgba(TIFF * tif, gdImagePtr im) rgba = buffer[(y * width + x)]; a = (0xff - TIFFGetA(rgba)) / 2; color = gdTrueColorAlpha(TIFFGetR(rgba), TIFFGetG(rgba), TIFFGetB(rgba), a); - + /* set pixel colour to this colour */ gdImageSetPixel(im, x, height - y - 1, color); } @@ -993,10 +992,10 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromTiffCtx(gdIOCtx *infile) goto error; } - if (TIFFGetField(tif, TIFFTAG_XRESOLUTION, &res_float)) { + if (TIFFGetField(tif, TIFFTAG_XRESOLUTION, &res_float)) { im->res_x = (unsigned int)res_float; //truncate } - if (TIFFGetField(tif, TIFFTAG_YRESOLUTION, &res_float)) { + if (TIFFGetField(tif, TIFFTAG_YRESOLUTION, &res_float)) { im->res_y = (unsigned int)res_float; //truncate } @@ -1070,4 +1069,45 @@ BGD_DECLARE(void *) gdImageTiffPtr(gdImagePtr im, int *size) return rv; } +#else + +static void _noTiffError(void) +{ + gd_error("TIFF image support has been disabled\n"); +} + +BGD_DECLARE(void) gdImageTiffCtx(gdImagePtr image, gdIOCtx *out) +{ + _noTiffError(); +} + +BGD_DECLARE(gdImagePtr) gdImageCreateFromTiffCtx(gdIOCtx *infile) +{ + _noTiffError(); + return NULL; +} + +BGD_DECLARE(gdImagePtr) gdImageCreateFromTiff(FILE *inFile) +{ + _noTiffError(); + return NULL; +} + +BGD_DECLARE(gdImagePtr) gdImageCreateFromTiffPtr(int size, void *data) +{ + _noTiffError(); + return NULL; +} + +BGD_DECLARE(void) gdImageTiff(gdImagePtr im, FILE *outFile) +{ + _noTiffError(); +} + +BGD_DECLARE(void *) gdImageTiffPtr(gdImagePtr im, int *size) +{ + _noTiffError(); + return NULL; +} + #endif |