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

Re: [pygame] [BUG] pygame-ctypes



Alex,

python-numeric-24.0-1mdk

Could be it's just too out of date then?

Phil

Alex Holkner <aholkner@xxxxxxxxxxxxxx> wrote:
Phil Hassey wrote:

> Hey,
>
> When I run this example and press the letter 'a':
>
> [phil@localhost examples_pygame]$ python blit_blends.py
> press keys 1-5 to change image to blit.
> A - ADD, S- SUB, M- MULT, - MIN, + MAX
> one pixel is:[(99, 0, 0, 255)]:
> press keys 1-5 to change image to blit.
> A - ADD, S- SUB, M- MULT, - MIN, + MAX
> Traceback (most recent call last):
> File "blit_blends.py", line 163, in ?
> main()
> File "blit_blends.py", line 77, in main
> im1.blit(img_to_blit, (0,0), None, blits[event.key])
> File "/usr/lib/python2.4/site-packages/pygame/surface.py", line 199,
> in blit
> _surface_blit(self, source, destrect, sourcerect, special_flags)
> File "/usr/lib/python2.4/site-packages/pygame/surface.py", line
> 1155, in _surface_blit
> result = _software_blit(src, srcrect, dst, dstrect, special_flags)
> File "/usr/lib/python2.4/site-packages/pygame/surface.py", line
> 1347, in _software_blit
> dR = array.minimum(dR + sR, 255)
> TypeError: function not supported for these types, and can't coerce to
> supported types

This works for me with Numeric 24.2, numpy 0.9.8 and numarray 1.3.1 at
16, 24 and 32-bit depths. I suspect this is a Numeric incompatibility.
Can you let me know your versions of these, if installed.

Thanks
Alex.




Alex Holkner <aholkner@xxxxxxxxxxxxxx> wrote:
Phil Hassey wrote:

> Hey,
>
> When I run this example and press the letter 'a':
>
> [phil@localhost examples_pygame]$ python blit_blends.py
> press keys 1-5 to change image to blit.
> A - ADD, S- SUB, M- MULT, - MIN, + MAX
> one pixel is:[(99, 0, 0, 255)]:
> press keys 1-5 to change image to blit.
> A - ADD, S- SUB, M- MULT, - MIN, + MAX
> Traceback (most recent call last):
> File "blit_blends.py", line 163, in ?
> main()
> File "blit_blends.py", line 77, in main
> im1.blit(img_to_blit, (0,0), None, blits[event.key])
> File "/usr/lib/python2.4/site-packages/pygame/surface.py", line 199,
> in blit
> _surface_blit(self, source, destrect, sourcerect, special_flags)
> File "/usr/lib/python2.4/site-packages/pygame/surface.py", line
> 1155, in _surface_blit
> result = _software_blit(src, srcrect, dst, dstrect, special_flags)
> File "/usr/lib/python2.4/site-packages/pygame/surface.py", line
> 1347, in _software_blit
> dR = array.minimum(dR + sR, 255)
> TypeError: function not supported for these types, and can't coerce to
> supported types

This works for me with Numeric 24.2, numpy 0.9.8 and numarray 1.3.1 at
16, 24 and 32-bit depths. I suspect this is a Numeric incompatibility.
Can you let me know your versions of these, if installed.

Thanks
Alex.



Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail.