I would like to load an image in tkinter from the pygame surface, and I am having a problem.
This is what I'm trying now:
image= pygame.image.tostring(surf, 'RGB') tkimage= tkinter.PhotoImage(data= image) canvas.create_image(0, 0, tkimage)
but I unfortunately get this error:
_tkinter.TclError: couldn't recognize image data
source share