X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fimagemagick_decoder.cc;h=5dc0b7b06d6ff9cfad6116ff12c7f7b6c1a4c7e0;hb=ba0a895137b630f5d308b123ef886d68090f855d;hp=5ebd6c8e1ccaba8ba498b6d453ad127573d6c0c3;hpb=d1b20374b1bd02b2929c9c3080c006874b525ef5;p=dcpomatic.git diff --git a/src/lib/imagemagick_decoder.cc b/src/lib/imagemagick_decoder.cc index 5ebd6c8e1..5dc0b7b06 100644 --- a/src/lib/imagemagick_decoder.cc +++ b/src/lib/imagemagick_decoder.cc @@ -25,13 +25,16 @@ #include "film.h" #include "exceptions.h" +#include "i18n.h" + using std::cout; using boost::shared_ptr; +using libdcp::Size; ImageMagickDecoder::ImageMagickDecoder ( - boost::shared_ptr f, boost::shared_ptr o, Job* j) - : Decoder (f, o, j) - , VideoDecoder (f, o, j) + boost::shared_ptr f, DecodeOptions o) + : Decoder (f, o) + , VideoDecoder (f, o) { if (boost::filesystem::is_directory (_film->content_path())) { for ( @@ -54,7 +57,7 @@ libdcp::Size ImageMagickDecoder::native_size () const { if (_files.empty ()) { - throw DecodeError ("no still image files found"); + throw DecodeError (_("no still image files found")); } /* Look at the first file and assume its size holds for all */ @@ -70,7 +73,7 @@ bool ImageMagickDecoder::pass () { if (_iter == _files.end()) { - if (!_film->dcp_length() || video_frame() >= _film->dcp_length().get()) { + if (video_frame() >= _film->still_duration_in_frames()) { return true; } @@ -97,7 +100,7 @@ ImageMagickDecoder::pass () delete magick_image; - image = image->crop (_film->crop(), false); + image = image->crop (_film->crop(), true); emit_video (image, 0);