Hi,

On Fri, 6 Dec 2019 08:36:18 +0000
Vasilis Vlachoudis <vasilis.vlachou...@cern.ch> wrote:

> 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.

maybe you could create a custom Image class that checks at program start
for the presence of PIL and if PIL is present uses scalable PIL
PhotoImages and if not plain tkinter ones, or let it depend on the user
configuration which ones to use.

Regards

Michael

.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

All your people must learn before you can reach for the stars.
                -- Kirk, "The Gamesters of Triskelion", stardate 3259.2
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to