I want to create a jpg image containg some graphics which I draw using the Tkinter Canvas widget. This draws the image to screen and then I use the PIL library ImageGrab() function to grab it off the screen into a file. It would be much neater to by-pass drawing it on screen by drawing it in memory and then capturing this in the desired format in a file - is this possible ?
kinniburghc
0
Newbie Poster
Recommended Answers
Jump to PostHere is one way to do it ...
# with the Tkinter canvas, drawings can only be saved as .ps files # use PIL to draw simultaneuosly to memory and then save to file # PIL allows .png .jpg .gif or .bmp file formats import Tkinter as …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.