[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pygame] SurfArray on Win32?
Hi,
This is my first post to the list, so please be gentle! :-)
I need a way to change the colors of a Surface, then turn
the surface into an OpenGL texture. I thought I'd found a
way to do it -- to simply transform the image into a Numeric
array using pygame.surfarray.array3d, then to modify the array,
and finally to change the array back into a Surface using
pygame.surfarray.make_surface -- and this way seemed to work
under Linux.
However, when I try to run the program under Windows 2000,
I get this error:
Traceback (most recent call last):
File "<pyshell#9>", line 1, in ?
fts = gllib.FourTexturedSquares( "single-sr.gif", (0.2, 0),
param.background_color, param.ic_color, 0.133333, 0.4)
File "gllib.py", line 1024, in __init__
sq1.recolor( self.colormap )
File "gllib.py", line 111, in recolor
new_img = pygame.surfarray.make_surface(d3)
ValueError: Invalid array datatype for surface
I can post a link to the program, or more information on the
problem -- frankly, I'm baffled.
Thanks for any advice, ---Josh
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org