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/k/i/kivybits-HEAD/Examples/3/main.py   kivybits(Download)
 
    # save to a file
    surf = pygame.image.fromstring(data, widget.size, 'RGBA', True)
    pygame.image.save(surf, filename)
 

src/s/i/SimpleCV-HEAD/SimpleCV/examples/util/ColorCube.py   SimpleCV(Download)
    raw_data = renderer.tostring_rgb()
    size = canvas.get_width_height()    
    surf = pg.image.fromstring(raw_data, size, "RGB")
    figure = Image(surf)
    ############ All done

src/k/i/Kivy-1.8.0/kivy/core/image/img_pygame.py   Kivy(Download)
    def save(filename, width, height, fmt, pixels, flipped):
        surface = pygame.image.fromstring(
            pixels, (width, height), fmt.upper(), flipped)
        pygame.image.save(surface, filename)
        return True

src/k/i/kivy-HEAD/kivy/core/image/img_pygame.py   kivy(Download)
    def save(filename, width, height, fmt, pixels, flipped):
        surface = pygame.image.fromstring(
            pixels, (width, height), fmt.upper(), flipped)
        pygame.image.save(surface, filename)
        return True

src/k/i/Kivy-1.8.0/kivy/core/window/window_pygame.py   Kivy(Download)
        data = glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE)
        data = str(buffer(data))
        surface = pygame.image.fromstring(data, (width, height), 'RGBA', True)
        pygame.image.save(surface, filename)
        Logger.debug('Window: Screenshot saved at <%s>' % filename)

src/k/i/kivy-HEAD/kivy/core/window/window_pygame.py   kivy(Download)
        data = glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE)
        data = str(buffer(data))
        surface = pygame.image.fromstring(data, (width, height), 'RGBA', True)
        pygame.image.save(surface, filename)
        Logger.debug('Window: Screenshot saved at <%s>' % filename)

src/p/r/presemt-HEAD/presemt/document.py   presemt(Download)
        w, h, pixels = thumb
        # convert pixels to jpeg
        surface = pygame.image.fromstring(pixels, (w, h), 'RGB', True)
        fn = tempfile.mktemp('.jpg')
        pygame.image.save(surface, fn)

src/p/y/PyMT-0.5.1/pymt/modules/recordvideo.py   PyMT(Download)
    glReadBuffer(GL_FRONT)
    data = glReadPixels(0, 0, win.width, win.height, GL_RGB, GL_UNSIGNED_BYTE)
    surface = pygame.image.fromstring(str(buffer(data)), win.size, 'RGB', True)
    filename = '%s%05d.%s' % (dump_prefix, dump_idx, dump_format)
    pygame.image.save(surface, filename)

src/p/y/PyMT-0.5.1/pymt/modules/keybinding.py   PyMT(Download)
    glReadBuffer(GL_FRONT)
    data = glReadPixels(0, 0, win.width, win.height, GL_RGB, GL_UNSIGNED_BYTE)
    surface = pygame.image.fromstring(str(buffer(data)), win.size, 'RGB', True)
    filename = None
    for i in xrange(9999):

src/p/y/PyGaze-HEAD/pygaze/_screen/pygamescreen.py   PyGaze(Download)
			try:
				# PIL Image to PyGame Surface
				img = pygame.image.fromstring(image.tostring(), (image.size[0],image.size[1]), 'RGB', False)
			except:
				raise Exception("Error in libscreen.PyGameScreen.draw_image: image format not recognized!")

  1 | 2 | 3 | 4  Next