[Tkinter-discuss] Is it possible to flatten a Canvas and an Image?

Michael Lange klappnase at web.de
Sun Dec 18 19:30:07 CET 2005

On Wed, 14 Dec 2005 21:53:32 -0500 (EST)
"Gerardo Juarez" <gerardo at computo-industrial.com.mx> wrote:

Hi Gerardo,

> Hi, I'm new to the list and just writing my second application in
> python/Tkinter. I have skimmed over the digests of the list but have not
> found this subject discussed.
> I have a Canvas and a PhotoImage displayed in it. The application draws a
> number of lines and other vector-features over the image, which works
> fine. Now, if I save the image, it is exactly that which is saved: the
> image. What about the vectors? Is there a way to 'flatten' the two layers
> that are there?
> If not, how would you suggest I could save the vectors over the image as a
> single image - short of retracing them with my own line-drawing routine on
> the image?

I never tried it, but I believe the canvases postscript() method should do what you want,
you would just have to convert its output file back into a gif or something.



More information about the Tkinter-discuss mailing list