diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2018-12-14 18:47:28 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2018-12-14 18:47:28 +0100 |
| commit | 465bca88f750c019f79f7da3b6c0d840b7d06d1e (patch) | |
| tree | 8fbac24fac15485709c0f679fd43faa1bf94b4c2 /src/jpeg-utils.cpp | |
| parent | 4d9387931268151bf30dd3d4e1e4435288acb5da (diff) | |
| download | cataract-465bca88f750c019f79f7da3b6c0d840b7d06d1e.tar.xz | |
jpeg-utils: ImageMagick 7 adaptations
MagickWand comes with a couple of incompatible API changes in version 7.
Diffstat (limited to 'src/jpeg-utils.cpp')
| -rw-r--r-- | src/jpeg-utils.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/jpeg-utils.cpp b/src/jpeg-utils.cpp index 32eb64f..2e214e4 100644 --- a/src/jpeg-utils.cpp +++ b/src/jpeg-utils.cpp @@ -15,6 +15,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "config.h" + #include <stdio.h> #include <string.h> #include <stdlib.h> @@ -22,7 +24,11 @@ #include <exiv2/image.hpp> #include <exiv2/exif.hpp> -#include <wand/MagickWand.h> +#ifdef HAVE_IMAGEMAGICK_7 +# include <MagickWand/MagickWand.h> +#else +# include <wand/MagickWand.h> +#endif #include <config.h> @@ -618,7 +624,11 @@ resize_image (const gchar *src, const gchar *dst, if (thumbnail) { MagickThumbnailImage (magick_wand, size_x, size_y); } else { +#ifdef HAVE_IMAGEMAGICK_7 + MagickResizeImage (magick_wand, size_x, size_y, LanczosFilter); +#else MagickResizeImage (magick_wand, size_x, size_y, LanczosFilter, 1.0); +#endif } } else { /* Perform resizing through ImageMagick commandline parser */ |
