Try to fix failure to load files with non-ASCII filenames into ImageMagick.
authorCarl Hetherington <cth@carlh.net>
Wed, 23 May 2018 12:15:26 +0000 (13:15 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 23 May 2018 12:47:34 +0000 (13:47 +0100)
src/lib/image_examiner.cc

index 69becafdd7566c18ea8e384edef8c74fdf7eb8ca..71f0ca41cab90db1d585c5fd2acf08218379e6d2 100644 (file)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "cross.h"
 #include "compose.hpp"
+#include "magick_image_proxy.h"
+#include "image.h"
 #include <dcp/openjpeg_image.h>
 #include <dcp/exceptions.h>
 #include <dcp/j2k.h>
@@ -65,9 +67,8 @@ ImageExaminer::ImageExaminer (shared_ptr<const Film> film, shared_ptr<const Imag
                }
                delete[] buffer;
        } else {
-               Magick::Image* image = new Magick::Image (content->path(0).string());
-               _video_size = dcp::Size (image->columns(), image->rows());
-               delete image;
+               MagickImageProxy proxy(content->path(0));
+               _video_size = proxy.image().first->size();
        }
 
        if (content->still ()) {