From 2868cfa4f8dc37cb764eddd9327ad4b2bee8ba0e Mon Sep 17 00:00:00 2001 From: Ingo Date: Wed, 7 May 2014 23:05:16 +0200 Subject: [PATCH] Using CLI some TIFFs are identified as RAW files, though they aren't (e.g. TIFFs from Enfuse), Issue 2002 --- rtgui/main.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/rtgui/main.cc b/rtgui/main.cc index d133c93be..d588b708d 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -581,12 +581,13 @@ int processLineParams( int argc, char **argv ) continue; } - // Load the image - ii = rtengine::InitialImage::load ( inputFile, true, &errorCode, NULL ); - if (ii) - isRaw=true; - else - ii = rtengine::InitialImage::load ( inputFile , false, &errorCode, NULL ); + // Load the image + isRaw = true; + Glib::ustring ext = getExtension (inputFile); + if (ext.lowercase()=="jpg" || ext.lowercase()=="jpeg" || ext.lowercase()=="tif" || ext.lowercase()=="tiff" || ext.lowercase()=="png") + isRaw = false; + + ii = rtengine::InitialImage::load ( inputFile, isRaw, &errorCode, NULL ); if (!ii) { errors++; std::cerr << "Error loading file: "<< inputFile << std::endl;