[gegl] operations/external/pixbuf: Use the GdkPixbuf's rowstride



commit aaf2477caec7505544234ae83aa9184c8b7aaa7b
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Feb 23 15:25:28 2017 +0100

    operations/external/pixbuf: Use the GdkPixbuf's rowstride
    
    ... instead of using GEGL_AUTO_ROWSTRIDE and assuming that it will be
    width * bytes per pixel.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779135

 operations/external/pixbuf.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/operations/external/pixbuf.c b/operations/external/pixbuf.c
index d0d41a0..688c65f 100644
--- a/operations/external/pixbuf.c
+++ b/operations/external/pixbuf.c
@@ -75,6 +75,9 @@ process (GeglOperation       *operation,
   if (o->pixbuf)
     {
       GeglRectangle extent;
+      gint stride;
+
+      stride = gdk_pixbuf_get_rowstride (GDK_PIXBUF (o->pixbuf));
 
       extent.x = 0;
       extent.y = 0;
@@ -82,7 +85,7 @@ process (GeglOperation       *operation,
       extent.height = gdk_pixbuf_get_height (GDK_PIXBUF (o->pixbuf));
 
       gegl_buffer_set (output, &extent, 0, NULL, gdk_pixbuf_read_pixels (GDK_PIXBUF (o->pixbuf)),
-                       GEGL_AUTO_ROWSTRIDE);
+                       stride);
     }
   return TRUE;
 }


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