Tkinter-PhotoImage question

Michael Peuser mpeuser at web.de
Sun Sep 21 06:21:36 EDT 2003


"Gregor Lingl" <glingl at aon.at> schrieb im Newsbeitrag
news:3F6CB8F4.8020001 at aon.at...
> Hi all,
>
> The Tkinter PhotoImage Widget can be set to
> "transparent" with the method blank().
>
> Moreover the color of single pixels or
> definite regions can be set with method put.
>
> I'd like to set single pixels (or some rectangular
> regions) to "transparent". Can I use put to
> accomplish this, and if so, which first argument
> ("data") have I to pass to put?
>
> If not, is there another way to do it?

Hi Gregor,
I know of no way to accomplish this with PhotoImage... I am using PIL which
is *much* more versatile, you have true alpha-blending and masks, and it
also works faster with larger images.

Kindly
MichaelP






More information about the Python-list mailing list