0

On my canvas, I am creating a large number of objects and images, and once loaded, the program finds it hard to maintain this large quantity and frequently crashes. A solution I thought up would be to convert the canvas into an image (perhaps using PIL?), clear the canvas and use canvas.create_image to paste the image-form of the original canvas. I am aware, and have found in similar questions, there are ways to convert the image to a png file/save the file on the PC - I do not want this - I want to turn the image into a PIL image or tkinter PhotoImage. How can I go about doing this?

Thanks

jakethefake
  • 338
  • 1
  • 3
  • 14
  • How many objects are you creating? In my experience the canvas can handle many thousands of objects. When the program crashes, do you get an error? – Bryan Oakley Jan 19 '20 at 21:28
  • @BryanOakley >20,000 objects at least, the entire program stops responding upon any attempt of contact/movement – jakethefake Jan 19 '20 at 21:30

0 Answers0