On, Fri May 16, 2008, Sam Morris wrote: > I've run into a problem with pygame 1.7.1 when using Python 2.5, but not > prior versions. > > >>> import cairo > >>> import pygame > >>> s = cairo.ImageSurface (cairo.FORMAT_ARGB32, 256, 192) > >>> i = pygame.image.frombuffer (s.get_data (), (256, 192), 'RGBA') > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > TypeError: char buffer type not available > > I also tried this with pygame 1.8, with no luck. > > Can anyone say whether this is likely to be a problem with Python, or > pygame, or my code? :) Merely a problem with pycairo, which does not implement the character buffer interface. Maybe we should enhance pygame.image.frombuffer to deal with arbitrary buffers instead of character buffers only. Regards Marcus
Attachment:
pgpxnVq17iFu4.pgp
Description: PGP signature