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

[pygame] pygame vs python2.5: pygame.image.frombuffer raises TypeError: char buffer type not available



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? :)

-- 
Sam Morris <sam@xxxxxxxxxxxxx>