I’m trying to display a picture stored into a PNIMage object, using the OnscreenImage class, however I can’t find how. What I’d like to do is something like :
myPNMImageObject = PNMImage()
OnscreenImage(image = myPNMImageObject) # doesn't work
First of all, even if you didn’t get my question, thank you for your answer. In fact, my problem is that I don’t want to load a picture from a plain picture file but from a PNMImage. So I can’t do :
image = 'filepatch/image.extension'
To be more explicit, I have a client powered by Panda3D that receives a serialized (with cPickle) PNMImage object from a server. The client must then display this PNMImage to screen. To do this, the only solution I found is to load the PNMImage object into the OnscreenImage
I’ll try some other tricks to find a solution and keep you up to date.