File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212static PyTypeObject * _PyGdkPixbuf_Type ;
1313#define PyGdkPixbuf_Type (*_PyGdkPixbuf_Type)
1414
15- /* Implement the equivalent to gtk.gdk.Pixbuf.get_pixels_array()
16- * To solve these problems with the pygtk version:
17- * 1) It works for Numeric, but not numarray
18- * 2) Its only available if pygtk is compiled with Numeric support
19- * Fedora 1,2,3 has PyGTK, but not Numeric and so does not have
20- * Pixbuf.get_pixels_array().
21- * Fedora 4 does have PyGTK, Numeric and Pixbuf.get_pixels_array()
22- */
23-
2415static PyObject *
2516pixbuf_get_pixels_array (PyObject * self , PyObject * args )
2617{
@@ -45,7 +36,7 @@ pixbuf_get_pixels_array(PyObject *self, PyObject *args)
4536 if (gdk_pixbuf_get_has_alpha (gdk_pixbuf ))
4637 dims [2 ] = 4 ;
4738
48- array = (PyArrayObject * )PyArray_FromDimsAndData (3 , dims , PyArray_UBYTE ,
39+ array = (PyArrayObject * )PyArray_SimpleNewFromData (3 , dims , PyArray_UBYTE ,
4940 (char * )gdk_pixbuf_get_pixels (gdk_pixbuf ));
5041 if (array == NULL )
5142 return NULL ;
You can’t perform that action at this time.
0 commit comments