diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-11-23 01:48:55 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-11-23 12:47:36 +0000 |
| commit | 80fafad9c11e0cd8cf9d6ce17deb83be6f680f2d (patch) | |
| tree | ad1b5f69d9863a86ecbf2c46ae0b7916ce60be09 /src/lib/util.cc | |
| parent | 2f51e117cbaf36b9e0ccb02c338b316fc8e26b9a (diff) | |
First cut at J2K import.
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index 2b7df86bf..ec8b0f7a5 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -797,6 +797,14 @@ valid_image_file (boost::filesystem::path f) return (ext == ".tif" || ext == ".tiff" || ext == ".jpg" || ext == ".jpeg" || ext == ".png" || ext == ".bmp" || ext == ".tga" || ext == ".dpx"); } +bool +valid_j2k_file (boost::filesystem::path f) +{ + string ext = f.extension().string(); + transform (ext.begin(), ext.end(), ext.begin(), ::tolower); + return (ext == ".j2k" || ext == ".j2c"); +} + string tidy_for_filename (string f) { |
