Jan-06-2018, 10:06 PM
Hi,
I find that PhotoImage does not handle jpeg images while Tk does.
I am building an open source GUI generator based on Tkinter and would like to be able to handle jpeg images without forcing my users and their potential users to install a separate package like Pillow or PIL. It seems to me that since Tk supports jpeg images and since jpeg images are so popular, Tkinter should support them within the standard Python library. I don't mind having to import a module, but I don't like requiring the installation of a package to get functionality supported by Tk.
Earlier documentation of Tk says that the only formats supported are GIF and PNG. However, experimentation with Tk shows that it indeed supports both PNG and JPEG and corresponding experimentation with Tkinter shows that PNG images are supported by PhotoImage but not JPEG suggesting that PhotoImage has been updated to handle PNG. So why has it never been updated to handle JPEG images?
Am I missing something? Is there another way to support JPEG within the standard Python library? Suggestions very welcome.
Thanks in Advance,
Don
I find that PhotoImage does not handle jpeg images while Tk does.
I am building an open source GUI generator based on Tkinter and would like to be able to handle jpeg images without forcing my users and their potential users to install a separate package like Pillow or PIL. It seems to me that since Tk supports jpeg images and since jpeg images are so popular, Tkinter should support them within the standard Python library. I don't mind having to import a module, but I don't like requiring the installation of a package to get functionality supported by Tk.
Earlier documentation of Tk says that the only formats supported are GIF and PNG. However, experimentation with Tk shows that it indeed supports both PNG and JPEG and corresponding experimentation with Tkinter shows that PNG images are supported by PhotoImage but not JPEG suggesting that PhotoImage has been updated to handle PNG. So why has it never been updated to handle JPEG images?
Am I missing something? Is there another way to support JPEG within the standard Python library? Suggestions very welcome.
Thanks in Advance,
Don