Commit 76408527 authored by Øyvind "pippin" Kolås's avatar Øyvind "pippin" Kolås

plug-ins: migrate file-png to new iterator-api

parent b7633c72
......@@ -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--)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment