Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

i want to make an image transparent

Status
Not open for further replies.

frozenevil

Programmer
Nov 6, 2007
4
MU
hi to all...
i'm working on an animation where i have to make the picture background.gif transparent.
l'm not able to do it.can you please help me or tell me what codes i should add to make the picture transparent.
thank in advance



import Tkinter
from Tkconstants import *
def window(tk):

global photo

frame=Tkinter.Frame(tk)

frame.pack()



canvas=Tkinter.Canvas(frame,bg ='white', width=500,height=500)

canvas.pack()



photo=Tkinter.PhotoImage(file="background.gif")
canvas.create_image(200, 250, image=photo)




root = Tkinter.Tk()

root.title("Simulation of infectious diseases")

window(root)

root.mainloop()




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top