From 89f66ac25a5fffa04cf3abc569a0b4eaf7259320 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 6 Jan 2014 11:06:40 +0000 Subject: Don't bother checking image counts for still-as-moving images; it seems a bit pointless. --- src/lib/image_examiner.cc | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) (limited to 'src/lib') diff --git a/src/lib/image_examiner.cc b/src/lib/image_examiner.cc index 2d150583a..17064fd45 100644 --- a/src/lib/image_examiner.cc +++ b/src/lib/image_examiner.cc @@ -41,36 +41,10 @@ ImageExaminer::ImageExaminer (shared_ptr film, shared_ptr frames; - size_t const N = content->number_of_paths (); - - for (size_t i = 0; i < N; ++i) { - boost::filesystem::path const p = content->path (i); - try { - frames.push_back (lexical_cast (p.stem().string())); - } catch (bad_lexical_cast &) { - /* We couldn't turn that filename into a number; never mind */ - } - - if (!_video_size) { - using namespace MagickCore; - Magick::Image* image = new Magick::Image (p.string()); - _video_size = libdcp::Size (image->columns(), image->rows()); - delete image; - } - - job->set_progress (float (i) / N); - } - - frames.sort (); - - if (N > 1 && frames.front() != 0 && frames.front() != 1) { - throw StringError (String::compose (_("first frame in moving image directory is number %1"), frames.front ())); - } - - if (N > 1 && frames.back() != frames.size() && frames.back() != (frames.size() - 1)) { - throw StringError (String::compose (_("there are %1 images in the directory but the last one is number %2"), frames.size(), frames.back ())); - } + using namespace MagickCore; + Magick::Image* image = new Magick::Image (content->path(0).string()); + _video_size = libdcp::Size (image->columns(), image->rows()); + delete image; if (content->still ()) { _video_length = Config::instance()->default_still_length() * video_frame_rate(); -- cgit v1.2.3