Hello!
GUI.Numeric.image_from_ndarray fails for certain image sizes under Windows:
>>> from numpy import zeros, uint8
>>> from GUI.Numerical import image_from_ndarray
>>> image_from_ndarray(zeros((1,7,3),dtype=uint8),'RGB').size
(0L, 0L)
>>> image_from_ndarray(zeros((1,8,3),dtype=uint8),'RGB').size
(8L, 1L)
I think it's because row_stride wants to be a multiple of 4 (in
GDIPlus.Bitmap.from_data):
GdipCreateBitmapFromScan0(width, height, row_stride, format, data,
byref(ptr))
--
Alexey
_______________________________________________
Pygui mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pygui