Stub to make still image content work.
[dcpomatic.git] / src / lib / imagemagick_content.cc
1 #include "imagemagick_content.h"
2 #include "compose.hpp"
3
4 #include "i18n.h"
5
6 using std::string;
7
8 ImageMagickContent::ImageMagickContent (boost::filesystem::path f)
9         : Content (f)
10         , VideoContent (f)
11 {
12         /* XXX */
13         _video_length = 10 * 24;
14 }
15
16 string
17 ImageMagickContent::summary () const
18 {
19         return String::compose (_("Image: %1"), file().filename ());
20 }
21
22 bool
23 ImageMagickContent::valid_file (boost::filesystem::path f)
24 {
25         string ext = f.extension().string();
26         transform (ext.begin(), ext.end(), ext.begin(), ::tolower);
27         return (ext == ".tif" || ext == ".tiff" || ext == ".jpg" || ext == ".jpeg" || ext == ".png" || ext == ".bmp");
28 }