Thanks Michael, at present my program is based that all the images are loaded as tkinter.PhotoImage. I am trying always to keep the python dependencies as low as possible. PIL is not required apart when the user wants some specific functionality (add-ons)
So for the case that someone wanted to resize them (PIL would be required) and I was thinking to resize them by temporarily converting them to PIL.Image and then back to tkinter.PhotoImage. Maybe my way is not the cleanest, but rather to do as you propose, load them as PIL.Images process and convert them to tkinter.PhotoImage. Vasilis ________________________________________ From: Tkinter-discuss [tkinter-discuss-bounces+vasilis.vlachoudis=cern...@python.org] on behalf of Michael Lange [klappn...@web.de] Sent: Wednesday, December 04, 2019 19:28 To: tkinter-discuss@python.org Subject: Re: [Tkinter-discuss] tkinter.PhotoImage to PIL.Image On Wed, 4 Dec 2019 19:25:45 +0100 Michael Lange <klappn...@web.de> wrote: > resized = im.resize((height, width), IMAGE.ANTIALIAS) ^^^^^^^^^^^^^ oops, should be resized = im.resize((width, height), IMAGE.ANTIALIAS) .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. The sight of death frightens them [Earthers]. -- Kras the Klingon, "Friday's Child", stardate 3497.2 _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org https://mail.python.org/mailman/listinfo/tkinter-discuss _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org https://mail.python.org/mailman/listinfo/tkinter-discuss