diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-07-26 00:20:21 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-07-26 00:20:21 +0100 |
| commit | 264a268f7c1244b47d9fa54ad342d80b0f98e16d (patch) | |
| tree | b184c193908fc96280ccffef4e51a67ab35eb69d /src/lib/util.cc | |
| parent | 78e5a331074a456097a162d47501daf1df1ab1a3 (diff) | |
Basic if sketchy support for image sequences.
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index 183ff7d8b..26dfa8bf7 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -775,3 +775,12 @@ LocaleGuard::~LocaleGuard () setlocale (LC_NUMERIC, _old); free (_old); } + +bool +valid_image_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"); +} + |
