title: Image in tkinter window by clicking on button
body: <p>I need help about this program, this program should open image in new tkinter window by clicking on button, but it doesn't it just opens new window without image.
  Where is the problem?</p>
  
  <p>Using: python 3.3 and tkinter</p>
  
  <p>This is program:</p>
  
  <pre><code>import sys
  from tkinter import *
  
  
  def button1():
      novi = Toplevel()
      canvas = Canvas(novi, width = 300, height = 200)
      canvas.pack(expand = YES, fill = BOTH)
      gif1 = PhotoImage(file = 'image.gif')
      canvas.create_image(50, 10, visual = gif1, anchor = NW)
  
  
  mGui = Tk()
  button1 = Button(mGui,text ='Sklop',command = button1, height=5, width=20).pack()
  
  mGui.mainloop()
  </code></pre>