File emacs-24.3-giflib5-interlace.patch of Package emacs.3898

2014-01-07  Paul Eggert  <eggert@cs.ucla.edu>

	Fix misdisplay of interlaced GIFs with libgif5 (Bug#16372).
	* image.c (gif_load): libgif5 deinterlaces for us, so don't do
	it again.

Index: emacs-24.3/src/image.c
===================================================================
--- emacs-24.3/src/image.c
+++ emacs-24.3/src/image.c
@@ -7378,7 +7378,10 @@ gif_load (struct frame *f, struct image
 	  }
 
       /* Apply the pixel values.  */
-      if (gif->SavedImages[j].ImageDesc.Interlace)
+#ifndef GIFLIB_MAJOR
+# define GIFLIB_MAJOR 0
+#endif
+      if (GIFLIB_MAJOR < 5 && gif->SavedImages[j].ImageDesc.Interlace)
 	{
 	  int row, pass;
 
openSUSE Build Service is sponsored by