Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(42)  |  Call(42)  |  Derive(0)  |  Import(0)
pygame.image.fromstring(string, size, format, flipped=False): return Surface
create new Surface from a string buffer

src/m/u/mugen-tools-HEAD/party.py   mugen-tools(Download)
            size = (sprite.width, sprite.height)
            palette = load_palette(data, sprite.palette_index)
            surface = pygame.image.fromstring(pixels, size, "P")
            surface.set_palette(palette)
            image_db[(groupno, itemno)] = surface

src/r/o/rockfordrobotics-HEAD/olpcgames/_cairoimage.py   rockfordrobotics(Download)
        log.info( 'Format = %s', format )
        return pygame.image.fromstring(
            data, 
            (width,height), 
            format

src/p/y/python-ardrone-HEAD/demo.py   python-ardrone(Download)
 
        try:
            surface = pygame.image.fromstring(drone.image, (W, H), 'RGB')
            # battery status
            hud_color = (255, 0, 0) if drone.navdata.get('drone_state', dict()).get('emergency_mask', 1) else (10, 10, 255)

src/p/y/python-ardrone-HEAD/arvideo.py   python-ardrone(Download)
        W, H = 320, 240
        screen = pygame.display.set_mode((W, H))
        surface = pygame.image.fromstring(image, (width, height), 'RGB')
        screen.blit(surface, (0, 0))
        pygame.display.flip()

src/p/y/pygame_cffi-HEAD/test/image_test.py   pygame_cffi(Download)
        rgba_buf = pygame.image.tostring(test_surface, "RGBA")
        rgba_buf = RotateARGBtoRGBA(RotateRGBAtoARGB(rgba_buf))
        test_rotate_functions = pygame.image.fromstring(rgba_buf, test_surface.get_size(), "RGBA")
 
        self.assert_(AreSurfacesIdentical(test_surface, test_rotate_functions))
 
        rgba_buf = pygame.image.tostring(test_surface, "RGBA")
        argb_buf = RotateRGBAtoARGB(rgba_buf)
        test_from_argb_string = pygame.image.fromstring(argb_buf, test_surface.get_size(), "ARGB")
        argb_buf = pygame.image.tostring(test_surface, "ARGB")
        rgba_buf = RotateARGBtoRGBA(argb_buf)
        test_to_argb_string = pygame.image.fromstring(rgba_buf, test_surface.get_size(), "RGBA")
 
        self.assert_(AreSurfacesIdentical(test_surface, test_to_argb_string))
        #"ERROR: image.tostring with ARGB failed"
 
 
        argb_buf = pygame.image.tostring(test_surface, "ARGB")
        test_to_from_argb_string = pygame.image.fromstring(argb_buf, test_surface.get_size(), "ARGB")

src/k/i/Kivy-1.8.0/kivy/tests/test_graphics.py   Kivy(Download)
 
        import pygame
        surface = pygame.image.fromstring(data, (512, 512), 'RGBA', True)
        pygame.image.save(surface, "results.png")
 

src/k/i/kivy-HEAD/kivy/tests/test_graphics.py   kivy(Download)
 
        import pygame
        surface = pygame.image.fromstring(data, (512, 512), 'RGBA', True)
        pygame.image.save(surface, "results.png")
 

src/k/a/kamaelia-HEAD/Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/UI/Pygame/VideoSurface.py   kamaelia(Download)
 
            # now render our frame
            image = pygame.image.fromstring(frame['rgb'], frame['size'], "RGB", False)
 
            if self.resize:

src/r/o/rockfordrobotics-HEAD/testolpc/_cairoimage.py   rockfordrobotics(Download)
        log.info( 'Format = %s', format )
        return pygame.image.fromstring(
            data, 
            (width,height), 
            format

Previous  1 | 2 | 3 | 4