SHA256
1
0
forked from pool/emacs
emacs/emacs-25.2-ImageMagick7.patch
2017-04-13 07:09:32 +00:00

54 lines
2.0 KiB
Diff

Index: emacs-25.2/configure.ac
===================================================================
--- emacs-25.2.orig/configure.ac 2017-04-12 11:44:53.680930444 +0200
+++ emacs-25.2/configure.ac 2017-04-12 11:44:53.692930606 +0200
@@ -2406,7 +2406,7 @@ if test "${HAVE_X11}" = "yes" || test "$
if test "${with_imagemagick}" != "no"; then
## 6.3.5 is the earliest version known to work; see Bug#17339.
## 6.8.2 makes Emacs crash; see Bug#13867.
- IMAGEMAGICK_MODULE="Wand >= 6.3.5 Wand != 6.8.2"
+ IMAGEMAGICK_MODULE="MagickWand >= 6.3.5 MagickWand != 6.8.2"
EMACS_CHECK_MODULES([IMAGEMAGICK], [$IMAGEMAGICK_MODULE])
AC_SUBST(IMAGEMAGICK_CFLAGS)
AC_SUBST(IMAGEMAGICK_LIBS)
Index: emacs-25.2/src/image.c
===================================================================
--- emacs-25.2.orig/src/image.c 2017-02-03 11:25:45.000000000 +0100
+++ emacs-25.2/src/image.c 2017-04-12 12:01:48.298637854 +0200
@@ -8402,7 +8402,11 @@ imagemagick_compute_animated_image (Magi
PixelWand **source, **dest;
size_t source_width, source_height;
ssize_t source_left, source_top;
+#if MagickLibVersion >= 0x700
+ PixelInfo pixel;
+#else
MagickPixelPacket pixel;
+#endif
DisposeType dispose;
ptrdiff_t lines = 0;
@@ -8467,7 +8471,11 @@ imagemagick_compute_animated_image (Magi
if (dispose == BackgroundDispose || PixelGetAlpha (source[x]))
{
PixelGetMagickColor (source[x], &pixel);
+#if MagickLibVersion >= 0x700
+ PixelSetPixelColor (dest[x + source_left], &pixel);
+#else
PixelSetMagickColor (dest[x + source_left], &pixel);
+#endif
}
}
PixelSyncIterator (dest_iterator);
@@ -8512,7 +8520,11 @@ imagemagick_load_image (struct frame *f,
MagickWand *image_wand;
PixelIterator *iterator;
PixelWand **pixels, *bg_wand = NULL;
+#if MagickLibVersion >= 0x700
+ PixelInfo pixel;
+#else
MagickPixelPacket pixel;
+#endif
Lisp_Object image;
Lisp_Object value;
Lisp_Object crop;