Skip to content

Instantly share code, notes, and snippets.

🌴
Looking for a change

Akshay Arora akshayaurora

🌴
Looking for a change
Block or report user

Report or block akshayaurora

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:1877073
from kivy.graphics.fbo import Fbo
from kivy.graphics import Rectangle, Color
from kivy.core.gl import glReadPixels, GL_RGBA, GL_UNSIGNED_BYTE
import pygame
def save_texture(texture, filename):
fbo = Fbo(size=texture.size)
fbo.add(Color(1, 1, 1))
fbo.add(Rectangle(size=texture.size, texture=texture))
fbo.draw()
You can’t perform that action at this time.