Tkinter-PhotoImage question

G

Gregor Lingl

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?

Thanks, Gregor
 
M

Michael Peuser

Gregor Lingl said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top