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

Re: [pygame] numpy array module now in the pygame development tree



Lenard Lindstrom wrote:
Lenard Lindstrom wrote:

It's good to see. Unfortunately I have already found a bug in the numpyarray.py module, line 217. A 3d array can also handle 24 bit pixels. So the third element of the shape needs be calculated.


I have another bug. Attached is a program which raises the following exception:

Traceback (most recent call last):
 File "ac_bug.py", line 6, in <module>
   ac = py.numpyarray.array_colorkey(s)  # Raises exception
File "C:\PRG\PYTHON25\lib\site-packages\pygame\numpyarray.py", line 309, in ar
ray_colorkey
   array = array2d (sf)
NameError: global name 'sf' is not defined


Just a guess, but sf probably should be surface.



I made the change myself and found that array_colorkey breaks for a 24 bit pixel surface since it calls array2d, which definitely cannot handle 24 bit pixels.

--
Lenard Lindstrom
<len-l@xxxxxxxxx>