Check for MagickAutoOrientImage

* configure.ac: Check for MagickAutoOrientImage.

* src/image.c (imagemagick_load_image): Don't use
MagickAutoOrientImage unless it's available.
This commit is contained in:
Lars Ingebrigtsen 2016-02-11 14:21:38 +11:00
parent 363e7097b6
commit 980836d80e
2 changed files with 3 additions and 1 deletions

View 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

View 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))
{