[gimp] app: gimpscanconvert: migrate to new buffer iterator



commit d99cae4ab8e3ba71c6131d7c0bd0cb26ef4f07f9
Author: Øyvind Kolås <pippin gimp org>
Date:   Tue Sep 11 00:19:39 2018 +0200

    app: gimpscanconvert: migrate to new buffer iterator

 app/core/gimpscanconvert.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/app/core/gimpscanconvert.c b/app/core/gimpscanconvert.c
index 742bb0e27b..108c0e1a47 100644
--- a/app/core/gimpscanconvert.c
+++ b/app/core/gimpscanconvert.c
@@ -20,6 +20,7 @@
 #include <string.h>
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
+#define GEGL_ITERATOR2_API
 #include <gegl.h>
 
 #include <cairo.h>
@@ -528,12 +529,12 @@ gimp_scan_convert_render_full (GimpScanConvert *sc,
   bpp    = babl_format_get_bytes_per_pixel (format);
 
   iter = gegl_buffer_iterator_new (buffer, NULL, 0, format,
-                                   GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE);
-  roi = &iter->roi[0];
+                                   GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE, 1);
+  roi = &iter->items[0].roi;
 
   while (gegl_buffer_iterator_next (iter))
     {
-      guchar     *data    = iter->data[0];
+      guchar     *data    = iter->items[0].data;
       guchar     *tmp_buf = NULL;
       const gint  stride  = cairo_format_stride_for_width (CAIRO_FORMAT_A8,
                                                            roi->width);


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