[gimp] plug-ins: migrate file-png to new iterator-api
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: migrate file-png to new iterator-api
- Date: Wed, 12 Sep 2018 11:54:34 +0000 (UTC)
commit 764085278fe351d3915c838c669d7ec50a3fb5bd
Author: Øyvind Kolås <pippin gimp org>
Date: Tue Sep 11 02:01:47 2018 +0200
plug-ins: migrate file-png to new iterator-api
plug-ins/common/file-png.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/plug-ins/common/file-png.c b/plug-ins/common/file-png.c
index 4fdaefb045..6ac721b803 100644
--- a/plug-ins/common/file-png.c
+++ b/plug-ins/common/file-png.c
@@ -38,6 +38,7 @@
* see ChangeLog
*/
+#define GEGL_ITERATOR2_API
#include "config.h"
#include <stdlib.h>
@@ -1360,13 +1361,13 @@ load_image (const gchar *filename,
file_format = gegl_buffer_get_format (buffer);
iter = gegl_buffer_iterator_new (buffer, NULL, 0, file_format,
- GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE);
+ GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE, 1);
n_components = babl_format_get_n_components (file_format);
g_warn_if_fail (n_components == 2);
while (gegl_buffer_iterator_next (iter))
{
- guchar *data = iter->data[0];
+ guchar *data = iter->items[0].data;
gint length = iter->length;
while (length--)
@@ -2118,13 +2119,13 @@ ia_has_transparent_pixels (GeglBuffer *buffer)
format = gegl_buffer_get_format (buffer);
iter = gegl_buffer_iterator_new (buffer, NULL, 0, format,
- GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
+ GEGL_ACCESS_READ, GEGL_ABYSS_NONE, 1);
n_components = babl_format_get_n_components (format);
g_return_val_if_fail (n_components == 2, FALSE);
while (gegl_buffer_iterator_next (iter))
{
- const guchar *data = iter->data[0];
+ const guchar *data = iter->items[0].data;
gint length = iter->length;
while (length--)
@@ -2161,13 +2162,13 @@ find_unused_ia_color (GeglBuffer *buffer,
format = gegl_buffer_get_format (buffer);
iter = gegl_buffer_iterator_new (buffer, NULL, 0, format,
- GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
+ GEGL_ACCESS_READ, GEGL_ABYSS_NONE, 1);
n_components = babl_format_get_n_components (format);
g_return_val_if_fail (n_components == 2, FALSE);
while (gegl_buffer_iterator_next (iter))
{
- const guchar *data = iter->data[0];
+ const guchar *data = iter->items[0].data;
gint length = iter->length;
while (length--)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]