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

Re: [pygame] Bug: numpyarray.pixels_alpha array not properly aligned



On, Wed Jan 09, 2008, Lenard Lindstrom wrote:

> That was fast. Unfortunately I found more bugs. In surfarray.py lines 241 
> and 243 should have "array" instead of "surface". Also make_surface ignores 
> all but the blue color plane for a 3d array. I have enclosed a test program 
> make_surface_bug.py.

Fixed in rev. 1077, thanks.
 
> Finally, I noticed a major performance decrease for array_colorkey on a 24 
> bit surface with numpy. It runs 80 times slower than with Numeric. The 
> attached array_colorkey.py is the benchmark program I used. 32 bits 
> surfaces are only 5 times slower, so I suppose one can always update ones 
> programs to them instead.

Right. The creation of a 2D array to check the colorkey for seems to be
the bottleneck. I'll look into it and see, if we can get some speed gain
here by avoiding the 2D array creation.

Regards
Marcus

Attachment: pgpoaFXjXTAXg.pgp
Description: PGP signature