[niepce] Fix RAW + JPEG treating as RAW, for now.



commit c81ec16c9a274b87a25526e64bc0bfb50b4591e7
Author: Hubert FiguiÃre <hub figuiere net>
Date:   Sun Jul 22 17:42:47 2012 -0700

    Fix RAW + JPEG treating as RAW, for now.

 src/niepce/modules/darkroom/darkroommodule.cpp |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/niepce/modules/darkroom/darkroommodule.cpp b/src/niepce/modules/darkroom/darkroommodule.cpp
index f0b5895..77bf9ff 100644
--- a/src/niepce/modules/darkroom/darkroommodule.cpp
+++ b/src/niepce/modules/darkroom/darkroommodule.cpp
@@ -49,8 +49,12 @@ void DarkroomModule::reload_image()
     }
     eng::LibFile::Ptr file = m_imagefile.lock();
     if(file) {
-        m_image->reload(file->path(), 
-                        file->fileType() == eng::LibFile::FILE_TYPE_RAW,
+        // currently we treat RAW + JPEG as RAW.
+        // TODO: have a way to actually choose the JPEG.
+        bool isRaw = (file->fileType() == eng::LibFile::FILE_TYPE_RAW)
+            || (file->fileType() == eng::LibFile::FILE_TYPE_RAW_JPEG);
+        const std::string& path = file->path();
+        m_image->reload(path, isRaw,
                         file->orientation());
         m_need_reload = false;
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]