pygtk r3121 - in trunk: . gtk



Author: gianmt
Date: Mon Apr  6 21:32:13 2009
New Revision: 3121
URL: http://svn.gnome.org/viewvc/pygtk?rev=3121&view=rev

Log:
2009-04-06  Gian Mario Tagliaretti  <gianmt gnome org>

	Bug 447388 â pixbuf.get_pixels_array() doesn't correctly flag the array
	as non-contiguous
	
	* gtk/gdkpixbuf.override: Revert this commit since it doesn't work
	with numpy and we are going to ship 2.15.0 with numpy support.
	Reopening the bug asking Tim Evens if he can fix the patch.



Modified:
   trunk/ChangeLog
   trunk/gtk/gdkpixbuf.override

Modified: trunk/gtk/gdkpixbuf.override
==============================================================================
--- trunk/gtk/gdkpixbuf.override	(original)
+++ trunk/gtk/gdkpixbuf.override	Mon Apr  6 21:32:13 2009
@@ -98,11 +98,12 @@
 static PyObject *
 _wrap_gdk_pixbuf_get_pixels_array(PyGObject *self)
 {
+
+
 #ifdef HAVE_NUMPY
     GdkPixbuf *pixbuf = GDK_PIXBUF(self->obj);
     PyArrayObject *array;
     int dims[3] = { 0, 0, 3 };
-    int rowstride;
 
     if (!have_numpy())
 	return NULL;
@@ -116,12 +117,7 @@
     if (array == NULL)
         return NULL;
 
-    rowstride = gdk_pixbuf_get_rowstride(pixbuf);
-    if (rowstride != array->strides[0]) {
-	/* pixbuf data is not contiguous */
-	array->strides[0] = rowstride;
-	array->flags &= ~CONTIGUOUS;
-    }
+    array->strides[0] = gdk_pixbuf_get_rowstride(pixbuf);
     /* the array holds a ref to the pixbuf pixels through this wrapper*/
     Py_INCREF(self);
     array->base = (PyObject *)self;



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