Documentation for Image
Documentation for glReadPixels
screenshot = glReadPixels( 0,0, 800, 600, GL_RGBA, GL_UNSIGNED_BYTE)
im = Image.frombuffer("RGBA", (800,600), screenshot, "raw", "RGBA", 0, 0)
im.save("test.jpg")
screenshot = glReadPixels( 0,0, 800, 600, GL_RGBA, GL_UNSIGNED_BYTE)
im = Image.frombuffer("RGBA", (800,600), screenshot, "raw", "RGBA", 0, 0)
im.save("test.jpg")
Excellent, just what I needed. Thanks!
AntwortenLöschen