[gimp/gimp-2-10] plug-ins: migrate psd plug-ins to new iterator api



commit 01be5ca18406d6ba5c77804ce8dbea785e83084d
Author: Øyvind Kolås <pippin gimp org>
Date:   Tue Sep 11 02:02:50 2018 +0200

    plug-ins: migrate psd plug-ins to new iterator api
    
    (cherry picked from commit 3a2014984d35377067a83e86465979d43a6a152d)

 plug-ins/file-psd/psd-load.c | 5 +++--
 plug-ins/file-psd/psd-save.c | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/plug-ins/file-psd/psd-load.c b/plug-ins/file-psd/psd-load.c
index fbb7d2f169..690a5f2b9b 100644
--- a/plug-ins/file-psd/psd-load.c
+++ b/plug-ins/file-psd/psd-load.c
@@ -18,6 +18,7 @@
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 
+#define GEGL_ITERATOR2_API
 #include "config.h"
 
 #include <string.h>
@@ -1872,11 +1873,11 @@ add_merged_image (gint32     image_id,
           iter = gegl_buffer_iterator_new (buffer, NULL, 0,
                                            babl_format ("R'G'B'A float"),
                                            GEGL_ACCESS_READWRITE,
-                                           GEGL_ABYSS_NONE);
+                                           GEGL_ABYSS_NONE, 1);
 
           while (gegl_buffer_iterator_next (iter))
             {
-              gfloat *data = iter->data[0];
+              gfloat *data = iter->items[0].data;
 
               for (i = 0; i < iter->length; i++)
                 {
diff --git a/plug-ins/file-psd/psd-save.c b/plug-ins/file-psd/psd-save.c
index 1952d6cd5f..dc643ef96e 100644
--- a/plug-ins/file-psd/psd-save.c
+++ b/plug-ins/file-psd/psd-save.c
@@ -63,6 +63,7 @@
  * BUGS:
  */
 
+#define GEGL_ITERATOR2_API
 #include "config.h"
 
 #include <errno.h>
@@ -1467,11 +1468,11 @@ create_merged_image (gint32 image_id)
       GeglBufferIterator *iter;
 
       iter = gegl_buffer_iterator_new (buffer, NULL, 0, format,
-                                       GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE);
+                                       GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE, 1);
 
       while (gegl_buffer_iterator_next (iter))
         {
-          guchar *d = iter->data[0];
+          guchar *d = iter->items[0].data;
           gint    i;
 
           for (i = 0; i < iter->length; i++)


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