From ba769630c6bbdbf281a190b742c246b114879abe Mon Sep 17 00:00:00 2001 From: Stefan Pöschel Date: Sun, 30 Apr 2017 15:41:02 +0200 Subject: Add support for ImageMagick version 7 Version 7 introduced slight API changes which are handled accordingly. Legacy version 6 has equivalent support in ODR-PadEnc and there are no plans to remove support for the next years. See also #3. --- src/sls.cpp | 4 ++++ src/sls.h | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src') 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); diff --git a/src/sls.h b/src/sls.h index 6dc9d47..0b5fae2 100644 --- a/src/sls.h +++ b/src/sls.h @@ -34,7 +34,11 @@ #include "pad_common.h" #if HAVE_MAGICKWAND -# include +# if HAVE_MAGICKWAND_LEGACY +# include +# else +# include +# endif #endif #include -- cgit v1.2.3