[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pygame] surfarray ..
- To: pygame-users@seul.org
- Subject: [pygame] surfarray ..
- From: Urmas Eero <sammy@local.ee>
- Date: Fri, 20 Dec 2002 17:58:50 +0200
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Fri, 20 Dec 2002 10:57:54 -0500
- Reply-to: pygame-users@seul.org
- Sender: owner-pygame-users@seul.org
- User-agent: Mozilla/5.0 (X11; U; Linux i686; et-EE; rv:1.2) Gecko/20021127
Hi,
I've got a problem with surfarray,the sample code looks something like this:
font = pygame.font ; font.init()
f = font.Font("uifont.ttf",32)
surf = f.render("test",0,(250,250,250))
asurf = pygame.surfarray.array3d(surf)
# the part that doesn't work:
surf = pygame.surfarray.make_surface(asurf)
and the error looks something like this:
Traceback (most recent call last):
File "./test.py", line 24, in ?
surf = pygame.surfarray.make_surface(asurf)
ValueError: Invalid array datatype for surface
What am I doing wrong ?
sammy
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org