So I've been trying to piece together something in Tkinter in Python 2.7 and I'm stuck somewhere.
I'm trying to get a fullscreen image to show up on my screen as a background, and put over several images, whom are transparent.
I've been told canvas is the 'only' way to go. So far, I have this:
# -*- coding: utf-8 -*-
#!/usr/bin/python
from Tkinter import *
from PIL import ImageTk, Image
root = Tk()
root.attributes('-fullscreen', True)
root.configure(cursor='none')
frame = Frame(root)
frame.pack()
bg_image = ImageTk.PhotoImage(file='weather_bg.png')
canvas = Canvas(root, width=800, height=480, highlightthickness=0)
canvas.pack()
canvas.create_image(0, 0, image=bg_image, anchor='nw')
img = ImageTk.PhotoImage(file='cloud.png')
Label(canvas, image=img, borderwidth='0').place(x = 335, y = 80)
root.mainloop()
The image that I want with a transparency does show up on top of the background image, although with gray for transparency..
A quick HTML test showed red transparency in my PNG file:
<html>
<body bgcolor="red">
<img src="cloud.png">
</body>
</html>
Help would be greatly appreciated!