X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fimage_examiner.cc;h=75ccb6a3e91fd3e21207ce26872f69f187b95170;hb=cb990adba9c57e5107ef2aa9716cf0a26c1df83d;hp=4cba788bdd5bb900a6436e4325092a86777a1e06;hpb=79ce26d031d109177ba4b0f637fa2960345a37a3;p=dcpomatic.git diff --git a/src/lib/image_examiner.cc b/src/lib/image_examiner.cc index 4cba788bd..75ccb6a3e 100644 --- a/src/lib/image_examiner.cc +++ b/src/lib/image_examiner.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013 Carl Hetherington + Copyright (C) 2013-2014 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,7 +18,6 @@ */ #include -#include #include #include "image_content.h" #include "image_examiner.h" @@ -33,22 +32,22 @@ using std::cout; using std::list; using std::sort; using boost::shared_ptr; -using boost::lexical_cast; -using boost::bad_lexical_cast; ImageExaminer::ImageExaminer (shared_ptr film, shared_ptr content, shared_ptr) : _film (film) , _image_content (content) { +#ifdef DCPOMATIC_IMAGE_MAGICK using namespace MagickCore; +#endif Magick::Image* image = new Magick::Image (content->path(0).string()); _video_size = dcp::Size (image->columns(), image->rows()); delete image; if (content->still ()) { - _video_length = ContentTime (Config::instance()->default_still_length()); + _video_length = ContentTime::from_seconds (Config::instance()->default_still_length()); } else { - _video_length = ContentTime (double (_image_content->number_of_paths ()) / video_frame_rate ()); + _video_length = ContentTime::from_frames (_image_content->number_of_paths (), video_frame_rate ()); } }