blob: 806c8ac5d422e905a00a0a9e0a0db2f0d457f886 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include "imagemagick_content.h"
#include "compose.hpp"
#include "i18n.h"
using std::string;
ImageMagickContent::ImageMagickContent (boost::filesystem::path f)
: Content (f)
, VideoContent (f)
{
}
string
ImageMagickContent::summary () const
{
return String::compose (_("Image: %1"), file().filename ());
}
bool
ImageMagickContent::valid_file (boost::filesystem::path f)
{
string ext = f.extension().string();
transform (ext.begin(), ext.end(), ext.begin(), ::tolower);
return (ext == ".tif" || ext == ".tiff" || ext == ".jpg" || ext == ".jpeg" || ext == ".png" || ext == ".bmp");
}
|