[gimp] app: actually use the needed cairo stride in gimp_scan_convert_render_full()



commit e7618dab310fe9d7f83343c877e6e33b642ea7e0
Author: Michael Natterer <mitch gimp org>
Date:   Sun May 13 22:57:58 2012 +0200

    app: actually use the needed cairo stride in gimp_scan_convert_render_full()

 app/core/gimpscanconvert.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/app/core/gimpscanconvert.c b/app/core/gimpscanconvert.c
index 49f3dfc4..28e7426 100644
--- a/app/core/gimpscanconvert.c
+++ b/app/core/gimpscanconvert.c
@@ -485,10 +485,10 @@ gimp_scan_convert_render_full (GimpScanConvert *sc,
 
   while (gegl_buffer_iterator_next (iter))
     {
-      guchar     *data  = iter->data[0];
+      guchar     *data    = iter->data[0];
       guchar     *tmp_buf = NULL;
-      const gint  stride   = cairo_format_stride_for_width (CAIRO_FORMAT_A8,
-                                                            roi->width);
+      const gint  stride  = cairo_format_stride_for_width (CAIRO_FORMAT_A8,
+                                                           roi->width);
 
       /*  cairo rowstrides are always multiples of 4, whereas
        *  maskPR.rowstride can be anything, so to be able to create an
@@ -500,7 +500,7 @@ gimp_scan_convert_render_full (GimpScanConvert *sc,
           const guchar *src = data;
           guchar       *dest;
 
-          dest = tmp_buf = g_alloca (roi->width * roi->height * bpp);
+          dest = tmp_buf = g_alloca (stride * roi->height);
 
           if (! replace)
             {



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