[gimp] plug-ins: migrate file-tiff-load to new iterator api



commit 29f63616d27a1e69dce7ebdc080250e24a0458f2
Author: Øyvind Kolås <pippin gimp org>
Date:   Tue Sep 11 02:03:09 2018 +0200

    plug-ins: migrate file-tiff-load to new iterator api

 plug-ins/file-tiff/file-tiff-load.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/plug-ins/file-tiff/file-tiff-load.c b/plug-ins/file-tiff/file-tiff-load.c
index 6d68495385..1097c31342 100644
--- a/plug-ins/file-tiff/file-tiff-load.c
+++ b/plug-ins/file-tiff/file-tiff-load.c
@@ -42,6 +42,7 @@
  * other special, indirect and consequential damages.
  */
 
+#define GEGL_ITERATOR2_API
 #include "config.h"
 
 #include <errno.h>
@@ -1469,7 +1470,7 @@ load_contiguous (TIFF        *tif,
                                                GEGL_RECTANGLE (0, 0, cols, rows),
                                                0, NULL,
                                                GEGL_ACCESS_READ,
-                                               GEGL_ABYSS_NONE);
+                                               GEGL_ABYSS_NONE, 2);
               gegl_buffer_iterator_add (iter, channel[i].buffer,
                                         GEGL_RECTANGLE (x, y, cols, rows),
                                         0, channel[i].format,
@@ -1477,8 +1478,8 @@ load_contiguous (TIFF        *tif,
 
               while (gegl_buffer_iterator_next (iter))
                 {
-                  guchar *s      = iter->data[0];
-                  guchar *d      = iter->data[1];
+                  guchar *s      = iter->items[0].data;
+                  guchar *d      = iter->items[1].data;
                   gint    length = iter->length;
 
                   s += offset;
@@ -1619,7 +1620,7 @@ load_separate (TIFF        *tif,
                                                    GEGL_RECTANGLE (0, 0, cols, rows),
                                                    0, NULL,
                                                    GEGL_ACCESS_READ,
-                                                   GEGL_ABYSS_NONE);
+                                                   GEGL_ABYSS_NONE, 2);
                   gegl_buffer_iterator_add (iter, channel[i].buffer,
                                             GEGL_RECTANGLE (x, y, cols, rows),
                                             0, channel[i].format,
@@ -1628,8 +1629,8 @@ load_separate (TIFF        *tif,
 
                   while (gegl_buffer_iterator_next (iter))
                     {
-                      guchar *s      = iter->data[0];
-                      guchar *d      = iter->data[1];
+                      guchar *s      = iter->items[0].data;
+                      guchar *d      = iter->items[1].data;
                       gint    length = iter->length;
 
                       d += offset;


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