From 264a268f7c1244b47d9fa54ad342d80b0f98e16d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 26 Jul 2013 00:20:21 +0100 Subject: Basic if sketchy support for image sequences. --- src/lib/util.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/lib/util.cc') 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"); +} + -- cgit v1.2.3