#include "config.h"
#include "cross.h"
#include "compose.hpp"
-#include "magick_image_proxy.h"
+#include "ffmpeg_image_proxy.h"
#include "image.h"
#include <dcp/openjpeg_image.h>
#include <dcp/exceptions.h>
#include <dcp/j2k.h>
-#include <Magick++.h>
#include <iostream>
#include "i18n.h"
: _film (film)
, _image_content (content)
{
-#ifdef DCPOMATIC_HAVE_MAGICKCORE_NAMESPACE
- using namespace MagickCore;
-#endif
boost::filesystem::path path = content->path(0).string ();
if (valid_j2k_file (path)) {
boost::uintmax_t size = boost::filesystem::file_size (path);
throw FileError ("Could not open file for reading", path);
}
uint8_t* buffer = new uint8_t[size];
- fread (buffer, 1, size, f);
+ checked_fread (buffer, size, f, path);
fclose (f);
try {
_video_size = dcp::decompress_j2k (buffer, size, 0)->size ();
}
delete[] buffer;
} else {
- MagickImageProxy proxy(content->path(0));
+ FFmpegImageProxy proxy(content->path(0));
_video_size = proxy.image().first->size();
}