PIL-> Tkinter

T

Tuvas

Is there a way to put an image loaded from PIL into a TKinter GUI?
Without converting the image to a .bmp, and using a canvas? If that's
the only way it'll work, I'll take it, but... It would be nice
otherwise...
 
K

Kevin Walzer

Tuvas said:
Is there a way to put an image loaded from PIL into a TKinter GUI?
Without converting the image to a .bmp, and using a canvas? If that's
the only way it'll work, I'll take it, but... It would be nice
otherwise...

Can you use PIL to convert it to a GIF? Tk can display GIF's natively.

--
Cheers,

Kevin Walzer, PhD
WordTech Software - "Tame the Terminal"
http://www.wordtech-software.com
sw at wordtech-software.com
 
F

Fredrik Lundh

Tuvas said:
Is there a way to put an image loaded from PIL into a TKinter GUI?
Without converting the image to a .bmp, and using a canvas? If that's
the only way it'll work, I'll take it, but... It would be nice
otherwise...

hmm. is google down today?

here's a random cookbook sample:

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/227575

also see:

http://effbot.org/imagingbook/imagetk.htm
http://effbot.org/tkinterbook/photoimage.htm

(if the image doesn't appear when it should, see the note at the bottom of
the photoimage page)

</F>
 
R

robert.dowell

I have an app that I wrote to move images from a camera/portable media
to an archive directory. It is using TKInter and PIL to display each
jpg as it is transfered. I can email you the code if you would like.
 
R

robert.dowell

I'm having issues with gmail at work but I will try to email it from
home tonight.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,148
Latest member
ElizbethDa
Top