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



commit 115c9070a419a9434412b91a4dd1fe12d4517359
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
    
    (cherry picked from commit 29f63616d27a1e69dce7ebdc080250e24a0458f2)

 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 7e7435cb8c..724a0b7494 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]