]> code.delx.au - gnu-emacs/commitdiff
Check for MagickAutoOrientImage
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 11 Feb 2016 03:21:38 +0000 (14:21 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 11 Feb 2016 03:21:38 +0000 (14:21 +1100)
* configure.ac: Check for MagickAutoOrientImage.

* src/image.c (imagemagick_load_image): Don't use
MagickAutoOrientImage unless it's available.

configure.ac
src/image.c

index c3e25544fee702dcd56c102a2f90a819a175764d..683447368fbbe7e8bfb77b14fe0d60c02c38ccc2 100644 (file)
@@ -2414,7 +2414,7 @@ if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${HAVE_W32}"
       OLD_LIBS=$LIBS
       CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
       LIBS="$IMAGEMAGICK_LIBS $LIBS"
-      AC_CHECK_FUNCS(MagickExportImagePixels MagickMergeImageLayers)
+      AC_CHECK_FUNCS(MagickExportImagePixels MagickMergeImageLayers MagickAutoOrientImage)
       CFLAGS=$OLD_CFLAGS
       LIBS=$OLD_LIBS
     fi
index e1b167de3d28d3078e45fb4ec6ea46d35f1e1679..f22394fb7cb02bd7843b34b83a3737b56333f9c6 100644 (file)
@@ -8560,6 +8560,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
       return 0;
     }
 
+#ifdef HAVE_MAGICKAUTOORIENTIMAGE
   /* If no :rotation is explicitly specified, apply the automatic
      rotation from EXIF. */
   if (NILP (image_spec_value (img->spec, QCrotation, NULL)))
@@ -8569,6 +8570,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
         DestroyMagickWand (image_wand);
         return 0;
       }
+#endif
 
   if (ino < 0 || ino >= MagickGetNumberImages (image_wand))
     {