0

I have a png picture which I show on a Frame as follows:

self.aaa = PhotoImage(file="some.png")
self.lbl1 = Label(self, image=self.aaa)
self.lbl1.pack()

The background of the picture is white and the background the Frame is darker. Can I somehow make the background of the Picture transparent without editing the picture, doesn't Tkinter allow that?

ako25
  • 889
  • 1
  • 8
  • 11
  • To use `PhotoImage` you had to use `PIL` which has many functions to edit images. Doc: [PIL/pillow](http://pillow.readthedocs.io/en/4.0.x/) – furas Jan 06 '17 at 04:34
  • @furas -- on the fly? it'd be ok for me, but permanently -- not. – ako25 Jan 06 '17 at 05:35
  • if you don't use `save()` then it will be temporary - only in memory – furas Jan 06 '17 at 08:38
  • @furas, could you show me an example? – ako25 Jan 06 '17 at 09:04
  • [Using PIL to make all white pixels transparent?](http://stackoverflow.com/questions/765736/using-pil-to-make-all-white-pixels-transparent) – furas Jan 06 '17 at 09:23

0 Answers0