hey hello, it’s been a while
Im looking for a way to generate an image file during the game, like a 128x128 .jpg whatever the viewport size is.
it looks you can not use makescreenshot for this need, so I was thinking about videotexture, generate a 128x128 texture from the scene, then write it… ?
import bge from bge import texture data = texture.ImageViewport() # data = texture.ImageRender() # bytes = ... ? path = g.expandPath('//icons/test.jpg') file = open(path,'wb') file.write(bytes) file.close()
thanks for any pointers.