cvs: gd /libgd/src gd_jpeg.c

From: Date: Fri, 09 May 2008 08:14:44 +0000
Subject: cvs: gd /libgd/src gd_jpeg.c
Groups: php.gd.cvs 
Request: Send a blank email to php-gd-cvs+get-476@lists.php.net to get a copy of this message
pajoye Fri May 9 08:14:44 2008 UTC Modified files: /gd/libgd/src gd_jpeg.c Log: - we only need HAVE_BOOLEAN under mingw with libjpeg (patches required in libjpeg, see our wiki) http://cvs.php.net/viewvc.cgi/gd/libgd/src/gd_jpeg.c?r1=1.22&r2=1.23&diff_format=u Index: gd/libgd/src/gd_jpeg.c diff -u gd/libgd/src/gd_jpeg.c:1.22 gd/libgd/src/gd_jpeg.c:1.23 --- gd/libgd/src/gd_jpeg.c:1.22 Fri Apr 18 09:27:03 2008 +++ gd/libgd/src/gd_jpeg.c Fri May 9 08:14:44 2008 @@ -1,7 +1,7 @@ /* * gd_jpeg.c: Read and write JPEG (JFIF) format image files using the * gd graphics library (http://www.libgd.org). - * + * * This software is based in part on the work of the Independent JPEG * Group. For more information on the IJG JPEG software (and JPEG * documentation, etc.), see ftp://ftp.uu.net/graphics/jpeg/. @@ -18,9 +18,10 @@ * major CGI brain damage * * 2.0.10: more efficient gdImageCreateFromJpegCtx, thanks to - * Christian Aberger + * Christian Aberger */ + #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -37,26 +38,7 @@ #ifdef HAVE_LIBJPEG #include "gdhelpers.h" -/* - Libjpeg's jmorecfg.h defines INT16 and INT32, but only if XMD_H is - not defined. MinGW and Borland compilers include a typedef for INT32, - which causes a conflict. MSVC does not include a conficting typedef - given the headers which are included. - */ -#if defined(__BORLANDC__) || defined(__MINGW32__) -# define XMD_H 1 -#endif - -/* - Another possible conflict under MinGW - */ -#if defined(WIN32) && defined(__MINGW32__) -# ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ - typedef unsigned char boolean; -# endif -# define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ -#endif - +# define HAVE_BOOLEAN /* JCE undef two symbols that we don't need anymore but which are may be defined in config.h from ./configure but which are @@ -267,7 +249,7 @@ } } } - + jpeg_finish_compress(&cinfo); jpeg_destroy_compress(&cinfo); gdFree(row); @@ -298,7 +280,7 @@ static int CMYKToRGB(int c, int m, int y, int k, int inverted); -/* +/* * Create a gd-format image from the JPEG-format INFILE. Returns the * image, or NULL upon error. */ @@ -319,6 +301,7 @@ #ifdef JPEG_DEBUG printf("gd-jpeg: gd JPEG version %s\n", GD_JPEG_VERSION); printf("gd-jpeg: JPEG library version %d, %d-bit sample values\n", JPEG_LIB_VERSION, BITS_IN_JSAMPLE); + printf("sizeof: %d\n", sizeof(struct jpeg_decompress_struct)); #endif memset(&cinfo, 0, sizeof(cinfo)); @@ -440,7 +423,7 @@ * latest libjpeg, replaced by something else. Unfortunately * there is still no right way to find out if the file was * progressive or not; just declare your intent before you - * write one by calling gdImageInterlace(im, 1) yourself. + * write one by calling gdImageInterlace(im, 1) yourself. * After all, we're not really supposed to rework JPEGs and * write them out again anyway. Lossy compression, remember? */ #if 0 @@ -529,7 +512,7 @@ fprintf(stderr, "gd-jpeg: warning: jpeg_finish_decompress" " reports suspended data source\n"); } - /* TBB 2.0.29: we should do our best to read whatever we can read, and a + /* TBB 2.0.29: we should do our best to read whatever we can read, and a * warning is a warning. A fatal error on warnings doesn't make sense. */ #if 0 /* This was originally added by Truxton Fulton */ @@ -701,7 +684,7 @@ { my_src_ptr src = (my_src_ptr)cinfo->src; /* 2.0.12: signed size. Thanks to Geert Jansen */ - /* 2.0.14: some platforms (mingw-msys) don't have ssize_t. Call + /* 2.0.14: some platforms (mingw-msys) don't have ssize_t. Call * an int an int. */ int nbytes = 0;

« previous php.gd.cvs (#476) next »