From 734340b52d30cb2dde9aa9e81c77277b261b128e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 18 Oct 2014 22:18:15 +0100 Subject: Fix build on Debian unstable which now has GraphicsMagick rather than ImageMagick. --- src/lib/image_examiner.cc | 2 ++ src/lib/image_proxy.cc | 4 ++++ src/lib/util.cc | 5 +++++ 3 files changed, 11 insertions(+) (limited to 'src/lib') diff --git a/src/lib/image_examiner.cc b/src/lib/image_examiner.cc index 4ff324f68..7058ea3b2 100644 --- a/src/lib/image_examiner.cc +++ b/src/lib/image_examiner.cc @@ -38,7 +38,9 @@ ImageExaminer::ImageExaminer (shared_ptr film, shared_ptrpath(0).string()); _video_size = libdcp::Size (image->columns(), image->rows()); delete image; diff --git a/src/lib/image_proxy.cc b/src/lib/image_proxy.cc index 3aba6cf7c..3851f88e7 100644 --- a/src/lib/image_proxy.cc +++ b/src/lib/image_proxy.cc @@ -156,7 +156,11 @@ MagickImageProxy::image () const /* Write line-by-line here as _image must be aligned, and write() cannot be told about strides */ uint8_t* p = _image->data()[0]; for (int i = 0; i < size.height; ++i) { +#ifdef DCPOMATIC_IMAGE_MAGICK using namespace MagickCore; +#else + using namespace MagickLib; +#endif magick_image->write (0, i, size.width, 1, "RGB", CharPixel, p); p += _image->stride()[0]; } diff --git a/src/lib/util.cc b/src/lib/util.cc index 290dd20ef..2e9ca66b2 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -43,7 +43,12 @@ #endif #include #include +#ifdef DCPOMATIC_IMAGE_MAGICK #include +#else +#include +#include +#endif #include #include #include -- cgit v1.2.3