title: Tkinter.PhotoImage doesn't not support png image
body: <p>I am using Tkinter to write a GUI and want to display a png file in a <code>Tkiner.Label</code>.
  So I have some code like this:</p>
  
  <pre><code>self.vcode.img = PhotoImage(data=open('test.png').read(), format='png')
  self.vcode.config(image=self.vcode.img)
  </code></pre>
  
  <p>This code <strong>runs correctly on my Linux machine</strong>. But when I run it on my windows machine, it fails. I also tested on several other machines (include windows and linux), it failed all the time.</p>
  
  <p>The Traceback is:</p>
  
  <pre class="lang-none prettyprint-override"><code>Exception in Tkinter callback
  Traceback (most recent call last):
    File "C:\Python27\lib\lib-tk\Tkinter.py", line 1486, in __call__
      return self.func(*args)
    File "C:\Documents and Settings\St\client\GUI.py", line 150, in showrbox
      SignupBox(self, self.server)
    File "C:\Documents and Settings\St\client\GUI.py", line 197, in __init__
      self.refresh_vcode()
    File "C:\Documents and Settings\St\client\GUI.py", line 203, in refresh_vcode
      self.vcode.img = PhotoImage(data=open('test.png').read(), format='png')
    File "C:\Python27\lib\lib-tk\Tkinter.py", line 3323, in __init__
      Image.__init__(self, 'photo', name, cnf, master, **kw)
    File "C:\Python27\lib\lib-tk\Tkinter.py", line 3279, in __init__
     self.tk.call(('image', 'create', imgtype, name,) + options)
  TclError: image format "png" is not supported
  </code></pre>
  
  <p>If I delete <code>format='png'</code> in the source code, the traceback will become:</p>
  
  <pre class="lang-none prettyprint-override"><code>Exception in Tkinter callback
  Traceback (most recent call last):
    File "C:\Python27\lib\lib-tk\Tkinter.py", line 1486, in __call__
      return self.func(*args)
    File "C:\Documents and Settings\St\client\GUI.py", line 150, in showrbox
      SignupBox(self, self.server)
    File "C:\Documents and Settings\St\client\GUI.py", line 197, in __init__
      self.refresh_vcode()
    File "C:\Documents and Settings\St\client\GUI.py", line 203, in refresh_vcode
      self.vcode.img = PhotoImage(data=open('test.png').read())
    File "C:\Python27\lib\lib-tk\Tkinter.py", line 3323, in __init__
      Image.__init__(self, 'photo', name, cnf, master, **kw)
    File "C:\Python27\lib\lib-tk\Tkinter.py", line 3279, in __init__
      self.tk.call(('image', 'create', imgtype, name,) + options)
  TclError: couldn't recognize image data
  </code></pre>
  
  <p>So, what should I do to make it support png files?</p>