Skip to content

Commit 72d90fc

Browse files
committed
As discussed a while ago, decoding GIF images is not considered a Unisys
LZW patent violation so we can distribute read-only GIF support with our bundled GD2. The patent also expires in 2003, which is quickly approaching, so we can roll in write support soon unless things change.
1 parent 797a0dc commit 72d90fc

File tree

4 files changed

+580
-1
lines changed

4 files changed

+580
-1
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
PHP 4 NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
? ? ??? 2002, Version 4.3.0
4+
- Read-only GIF support for bundled GD2 library (Rasmus)
45
- Make the glue argument to implode() optional, if it is not specified
56
default to using "". (Sterling)
67
- Fixed fields argument to contain correct info for xslt_set_error_handler.

ext/gd/config.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ if test "$PHP_GD" = "php"; then
243243
libgd/gd_io_file.c libgd/gd_ss.c libgd/gd_io_ss.c libgd/gd_png.c libgd/gd_jpeg.c \
244244
libgd/gdxpm.c libgd/gdfontt.c libgd/gdfonts.c libgd/gdfontmb.c libgd/gdfontl.c \
245245
libgd/gdfontg.c libgd/gdtables.c libgd/gdft.c libgd/gdcache.c libgd/gdkanji.c \
246-
libgd/wbmp.c libgd/gd_wbmp.c libgd/gdhelpers.c libgd/gd_topal.c"
246+
libgd/wbmp.c libgd/gd_wbmp.c libgd/gdhelpers.c libgd/gd_topal.c libgd/gd_gif_in.c"
247247

248248
dnl check for fabsf and floorf which are available since C99
249249
AC_CHECK_FUNCS(fabsf floorf)
@@ -273,6 +273,7 @@ dnl These are always available with bundled library
273273
AC_DEFINE(HAVE_GD_GD2, 1, [ ])
274274
AC_DEFINE(HAVE_GD_PNG, 1, [ ])
275275
AC_DEFINE(HAVE_GD_BUNDLED, 1, [ ])
276+
AC_DEFINE(HAVE_GD_GIF_READ, 1, [ ])
276277

277278
dnl Make sure the libgd/ is first in the include path
278279
GDLIB_CFLAGS="-DHAVE_LIBPNG"

ext/gd/libgd/gd.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,10 @@ void gdImageJpegCtx(gdImagePtr im, gdIOCtx *out, int quality);
376376
/* Best to free this memory with gdFree(), not free() */
377377
void *gdImageJpegPtr(gdImagePtr im, int *size, int quality);
378378

379+
gdImagePtr gdImageCreateFromGif(FILE *fd);
380+
gdImagePtr gdImageCreateFromGifCtx(gdIOCtxPtr in);
381+
gdImagePtr gdImageCreateFromGifSource(gdSourcePtr in);
382+
379383
/* A custom data sink. For backwards compatibility. Use
380384
gdIOCtx instead. */
381385
/* The sink function must return -1 on error, otherwise the number

0 commit comments

Comments
 (0)