GIFs Using Tkinter

Jeff Epler jepler at unpythonic.net
Mon Sep 8 08:55:34 EDT 2003


gregor,
I was also able to get a reliable display using
        bytes = open(imgfile, "rb").read()
        bytes = base64.encodestring(bytes)
        img = PhotoImage(data=bytes)

If you're using Windows, the missing part may be the "b" (binary) option
when opening the file.  If not, you'll need to provide more information
about what you're doing.

Jeff





More information about the Python-list mailing list