summaryrefslogtreecommitdiff
path: root/src/lib/image_content.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/image_content.cc')
-rw-r--r--src/lib/image_content.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/image_content.cc b/src/lib/image_content.cc
index 1dbd7871b..4073cd52c 100644
--- a/src/lib/image_content.cc
+++ b/src/lib/image_content.cc
@@ -37,12 +37,19 @@ ImageContent::ImageContent (shared_ptr<const Film> f, boost::filesystem::path p)
: Content (f)
, VideoContent (f)
{
+ bool have_j2k = false;
if (boost::filesystem::is_regular_file (p)) {
_paths.push_back (p);
+ if (valid_j2k_file (p)) {
+ have_j2k = true;
+ }
} else {
for (boost::filesystem::directory_iterator i(p); i != boost::filesystem::directory_iterator(); ++i) {
if (boost::filesystem::is_regular_file (i->path()) && valid_image_file (i->path())) {
_paths.push_back (i->path ());
+ if (valid_j2k_file (i->path ())) {
+ have_j2k = true;
+ }
}
}
@@ -52,6 +59,11 @@ ImageContent::ImageContent (shared_ptr<const Film> f, boost::filesystem::path p)
sort (_paths.begin(), _paths.end());
}
+
+ if (have_j2k) {
+ /* We default to no colour conversion if we have JPEG2000 files */
+ unset_colour_conversion ();
+ }
}