diff options
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/sls.cpp | 4 | ||||
-rw-r--r-- | src/sls.h | 6 |
4 files changed, 13 insertions, 2 deletions
@@ -22,7 +22,8 @@ How to build Requirements: * a C++11 compiler -* ImageMagick MagickWand, version 6 (optional, for MOT Slideshow) +* ImageMagick MagickWand (optional, for MOT Slideshow), + version 6 (legacy) or 7 To install MagickWand on Debian or Ubuntu: diff --git a/configure.ac b/configure.ac index b5a11dd..52612c9 100644 --- a/configure.ac +++ b/configure.ac @@ -29,6 +29,8 @@ fi AS_IF([ pkg-config MagickWand ], AC_DEFINE(HAVE_MAGICKWAND, [1], [Define if MagickWand is available])) +AS_IF([ pkg-config "MagickWand < 7" ], + AC_DEFINE(HAVE_MAGICKWAND_LEGACY, [1], [Define if a legacy (prior to version 7) MagickWand is available])) AM_CONDITIONAL([IS_GIT_REPO], [test -d '.git']) diff --git a/src/sls.cpp b/src/sls.cpp index 9df7824..1111088 100644 --- a/src/sls.cpp +++ b/src/sls.cpp @@ -229,7 +229,11 @@ size_t SLSManager::resizeImage(MagickWand* m_wand, unsigned char** blob, const s height = height * 320.0 / width; width = 320; } +#ifdef HAVE_MAGICKWAND_LEGACY MagickResizeImage(m_wand, width, height, LanczosFilter, 1); +#else + MagickResizeImage(m_wand, width, height, LanczosFilter); +#endif } height = MagickGetImageHeight(m_wand); @@ -34,7 +34,11 @@ #include "pad_common.h" #if HAVE_MAGICKWAND -# include <wand/magick_wand.h> +# if HAVE_MAGICKWAND_LEGACY +# include <wand/magick_wand.h> +# else +# include <MagickWand/MagickWand.h> +# endif #endif #include <sys/stat.h> |