boost::uintmax_t const size = boost::filesystem::file_size (path);
FILE* f = fopen_boost (path, "rb");
if (!f) {
- throw OpenFileError (path);
+ throw OpenFileError (path, errno, true);
}
uint8_t* data = new uint8_t[size];
}
shared_ptr<Image>
-MagickImageProxy::image (optional<dcp::NoteHandler>) const
+MagickImageProxy::image (optional<dcp::NoteHandler>, optional<dcp::Size>) const
{
boost::mutex::scoped_lock lm (_mutex);
throw DecodeError (String::compose (_("Could not decode image file (%1)"), error));
}
+#ifdef DCPOMATIC_IMAGE_MAGICK
+ if (magick_image->colorSpace() == Magick::LogColorspace) {
+ magick_image->colorSpace(Magick::RGBColorspace);
+ }
+#endif
+#ifdef DCPOMATIC_GRAPHICS_MAGICK
+ if (magick_image->colorSpace() == Magick::CineonLogRGBColorspace) {
+ magick_image->colorSpace(Magick::RGBColorspace);
+ }
+
+#endif
+
dcp::Size size (magick_image->columns(), magick_image->rows());
_image.reset (new Image (AV_PIX_FMT_RGB24, size, true));