[niepce] Implement a dcraw loader in the mean time.



commit 1b8655ae1516797d765d5dc9f591d9a9dd10ede8
Author: Hubert FiguiÃre <hub figuiere net>
Date:   Wed Jul 25 18:26:10 2012 -0700

    Implement a dcraw loader in the mean time.

 src/ncr/image.cpp |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/ncr/image.cpp b/src/ncr/image.cpp
index 1eb19b6..a644f5e 100644
--- a/src/ncr/image.cpp
+++ b/src/ncr/image.cpp
@@ -71,6 +71,7 @@ struct Image::Private {
 
     GeglNode* _rotate_node(int orientation);
     GeglNode* _scale_node();
+    GeglNode* _load_dcraw(const std::string &path);
     GeglNode* _load_raw(const std::string &path);
 };
 
@@ -134,6 +135,14 @@ GeglNode* Image::Private::_rotate_node(int orientation)
     return rotationNode;
 }
 
+/** Use dcraw as a loader. Temporary fix */
+GeglNode* Image::Private::_load_dcraw(const std::string &p)
+{
+    return gegl_node_new_child(m_graph,
+                               "operation", "gegl:raw-load",
+                               "path", p.c_str(), NULL);
+}
+
 /** create the RAW pipeline */
 GeglNode* Image::Private::_load_raw(const std::string &p)
 {
@@ -206,7 +215,7 @@ void Image::reload(const std::string & p, bool is_raw,
                                         "path", p.c_str(), NULL);
     }
     else {
-        load_file = priv->_load_raw(p);
+        load_file = priv->_load_dcraw(p);
     }
 
     priv->m_rotate_n = priv->_rotate_node(orientation);



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