X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fimage_proxy.cc;h=039b1113300937fde92b65a7cad3f69880f3cb6f;hp=ba572c72733e9c636a37575ca5cc04d6c609891b;hb=e6c67f4aac2ca9afc275b6f13058e1e46f2cecc3;hpb=79a871ea740509ff2fa540ca715375e0ba1c4ad9 diff --git a/src/lib/image_proxy.cc b/src/lib/image_proxy.cc index ba572c727..039b11133 100644 --- a/src/lib/image_proxy.cc +++ b/src/lib/image_proxy.cc @@ -18,8 +18,8 @@ */ #include -#include -#include +#include +#include #include "image_proxy.h" #include "image.h" #include "exceptions.h" @@ -51,7 +51,7 @@ RawImageProxy::RawImageProxy (shared_ptr image, shared_ptr log) RawImageProxy::RawImageProxy (shared_ptr xml, shared_ptr socket, shared_ptr log) : ImageProxy (log) { - libdcp::Size size ( + dcp::Size size ( xml->number_child ("Width"), xml->number_child ("Height") ); @@ -69,9 +69,9 @@ void RawImageProxy::add_metadata (xmlpp::Node* node) const { node->add_child("Type")->add_child_text (N_("Raw")); - node->add_child("Width")->add_child_text (libdcp::raw_convert (_image->size().width)); - node->add_child("Height")->add_child_text (libdcp::raw_convert (_image->size().height)); - node->add_child("PixelFormat")->add_child_text (libdcp::raw_convert (_image->pixel_format ())); + node->add_child("Width")->add_child_text (dcp::raw_convert (_image->size().width)); + node->add_child("Height")->add_child_text (dcp::raw_convert (_image->size().height)); + node->add_child("PixelFormat")->add_child_text (dcp::raw_convert (_image->pixel_format ())); } void @@ -128,10 +128,9 @@ MagickImageProxy::image () const throw DecodeError (_("Could not decode image file")); } + dcp::Size size (magick_image->columns(), magick_image->rows()); LOG_TIMING ("[%1] MagickImageProxy decode finished", boost::this_thread::get_id ()); - libdcp::Size size (magick_image->columns(), magick_image->rows()); - _image.reset (new Image (PIX_FMT_RGB24, size, true)); /* Write line-by-line here as _image must be aligned, and write() cannot be told about strides */