[niepce] Update to match libopenraw 0.2.0 API



commit 4aa00ca49d0f3ab84b02817a2fb37f30bf6a3e9f
Author: Hubert FiguiÃre <hub figuiere net>
Date:   Thu May 31 20:56:13 2012 -0700

    Update to match libopenraw 0.2.0 API

 README          |    2 +-
 configure.ac    |    4 ++--
 src/ncr/ncr.cpp |   32 ++++++++++++++++----------------
 3 files changed, 19 insertions(+), 19 deletions(-)
---
diff --git a/README b/README
index eb00dbc..46a23d9 100644
--- a/README
+++ b/README
@@ -30,7 +30,7 @@ libxml2 > 2.5.0
 boost 1.34
  -boost test (for the unit test)
 exempi >= 2.2.0
-libopenraw >= 0.0.5
+libopenraw >= 0.1.0
 geglmm >= 0.1.0
 gegl >= 0.1.0
 babl
diff --git a/configure.ac b/configure.ac
index a028a81..0068f39 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 AC_INIT(niepce, 0.0.1)
 AC_PREREQ(2.59)
 AC_CONFIG_SRCDIR(README)
-AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
+AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz])
 m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
 AM_SILENT_RULES([yes])
 AC_CONFIG_HEADER(config.h)
@@ -27,7 +27,7 @@ EXEMPI_VERSION=2.2.0
 SQLITE_VERSION=3.0
 GEGL_VERSION=0.1.0
 GEGLMM_VERSION=0.2.0
-LIBOPENRAW_VERSION=0.0.5
+LIBOPENRAW_VERSION=0.1.0
 LIBGPHOTO_VERSION=2.4
 dnl need at least 2.5.0 because of xmlTextReader
 LIBXML2_VERSION=2.5.0
diff --git a/src/ncr/ncr.cpp b/src/ncr/ncr.cpp
index 535a764..9d46811 100644
--- a/src/ncr/ncr.cpp
+++ b/src/ncr/ncr.cpp
@@ -30,23 +30,23 @@ Glib::RefPtr<Gegl::Buffer> load_rawdata(ORRawDataRef rawdata)
 {
     uint32_t x, y;
     void *data;
-    if(or_rawdata_format(rawdata) == OR_DATA_TYPE_CFA) {
-        /* TODO take the dest_x and dest_y into account */
-        GeglRectangle rect = {0, 0, 0, 0};
-        or_rawdata_dimensions(rawdata, &x, &y);
-        rect.width = x;
-        rect.height = y;
-        
-        Glib::RefPtr<Gegl::Buffer> buffer 
-            = Gegl::Buffer::create(Gegl::Rectangle(rect), babl_format ("Y u16"));
-        
-        data = or_rawdata_data(rawdata);
-        buffer->set(Gegl::Rectangle(rect), 1, babl_format ("Y u16"),
-                    data, GEGL_AUTO_ROWSTRIDE);
-        
-        return buffer;
+    if(or_rawdata_format(rawdata) != OR_DATA_TYPE_RAW) {
+        return Glib::RefPtr<Gegl::Buffer>();
     }
-    return Glib::RefPtr<Gegl::Buffer>();
+    /* TODO take the dest_x and dest_y into account */
+    GeglRectangle rect = {0, 0, 0, 0};
+    or_rawdata_dimensions(rawdata, &x, &y);
+    rect.width = x;
+    rect.height = y;
+
+    Glib::RefPtr<Gegl::Buffer> buffer
+        = Gegl::Buffer::create(Gegl::Rectangle(rect), babl_format ("Y u16"));
+
+    data = or_rawdata_data(rawdata);
+    buffer->set(Gegl::Rectangle(rect), 1, babl_format ("Y u16"),
+                data, GEGL_AUTO_ROWSTRIDE);
+
+    return buffer;
 }
 
 }



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