[gimp/goat-invasion: 569/608] app: port gimp_channel_bounds() and is_empty() to float



commit bd0856acf25a1963e33f234febc54d9feee1b1a5
Author: Michael Natterer <mitch gimp org>
Date:   Tue Apr 24 14:19:25 2012 +0200

    app: port gimp_channel_bounds() and is_empty() to float

 app/core/gimpchannel.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/app/core/gimpchannel.c b/app/core/gimpchannel.c
index 8c533fd..f92c8dd 100644
--- a/app/core/gimpchannel.c
+++ b/app/core/gimpchannel.c
@@ -1072,14 +1072,14 @@ gimp_channel_real_bounds (GimpChannel *channel,
 
   buffer = gimp_drawable_get_buffer (GIMP_DRAWABLE (channel));
 
-  iter = gegl_buffer_iterator_new (buffer, NULL, 0, babl_format ("Y u8"),
+  iter = gegl_buffer_iterator_new (buffer, NULL, 0, babl_format ("Y float"),
                                    GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
   roi = &iter->roi[0];
 
   while (gegl_buffer_iterator_next (iter))
     {
-      guchar *data  = iter->data[0];
-      guchar *data1 = data;
+      gfloat *data  = iter->data[0];
+      gfloat *data1 = data;
       gint    ex    = roi->x + roi->width;
       gint    ey    = roi->y + roi->height;
       gint    x, y;
@@ -1170,12 +1170,12 @@ gimp_channel_real_is_empty (GimpChannel *channel)
 
   buffer = gimp_drawable_get_buffer (GIMP_DRAWABLE (channel));
 
-  iter = gegl_buffer_iterator_new (buffer, NULL, 0, babl_format ("Y u8"),
+  iter = gegl_buffer_iterator_new (buffer, NULL, 0, babl_format ("Y float"),
                                    GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
 
   while (gegl_buffer_iterator_next (iter))
     {
-      guchar *data = iter->data[0];
+      gfloat *data = iter->data[0];
       gint    i;
 
       for (i = 0; i < iter->length; i++)



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