title: PNG display in PIL broken on OS X Mavericks?
body: <p>I've noticed that PNG images aren't displaying in Tkinter apps using ImageTk.PhotoImage in OS X Mavericks. But, GIFs and JPEGs display fine. There's no error printed or exception thrown and debugging the code shows the image is read and has the correct height &amp; width. Here's a simplified example:</p>
  
  <pre><code>import Tkinter
  from PIL import Image, ImageTk
  
  logo_file = 'test.png'
  #logo_file = 'test.gif'
  
  
  class Application(Tkinter.Frame):
      def __init__(self, master):
          Tkinter.Frame.__init__(self, master)
          self.master.minsize(width=512, height=256)
          self.master.config()
  
          self.pack()
  
          self.main_frame = Tkinter.Frame()
          self.some_image = ImageTk.PhotoImage(Image.open(logo_file))
  
          some_label = Tkinter.Label(self.main_frame, image=self.some_image)
          some_label.config()
          some_label.pack(side='top')
  
          self.main_frame.place(in_=self.master, anchor='c', relx=.5, rely=.5)
  
  root = Tkinter.Tk()
  app = Application(root)
  app.mainloop()
  </code></pre>
  
  <p>If you use a GIF the image will be displayed, but using a PNG it will not. Again, this is only happening on OS X Mavericks, Mountain Lion works fine. I've tried re-installing (compiling PIL) with no luck, as well as trying a new virtualenv.</p>
  
  <p>Is there perhaps some PNG attribute I need to set correctly when creating/saving the PNG? Or is this a bug in PIL or Tkinter or OS X?</p>
  
  <p><strong>Update to add some details</strong></p>
  
  <p>I'm using:</p>
  
  <ul>
  <li>Python 2.7.5 (/usr/bin/python)</li>
  <li>PIL 1.1.7 (compiled using pip)</li>
  </ul>
  
  <p>This is on a machine that was just updated to Mavericks from Mountain Lion, and previously had PIL installed, and I haven't messed with the system Python shipped by Apple.</p>
  
  <p><strong>Update 2 Pillow setup summary</strong></p>
  
  <p>I installed Pillow 2.2.1 and it says it has PNG support:</p>
  
  <pre><code>--------------------------------------------------------------------
  PIL SETUP SUMMARY
  --------------------------------------------------------------------
  version      Pillow 2.2.1
  platform     darwin 2.7.5 (default, Aug 25 2013, 00:04:04)
               [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]
  --------------------------------------------------------------------
  --- TKINTER support available
  --- JPEG support available
  --- ZLIB (PNG/ZIP) support available
  --- TIFF G3/G4 (experimental) support available
  --- FREETYPE2 support available
  *** LITTLECMS support not available
  *** WEBP support not available
  *** WEBPMUX support not available
  --------------------------------------------------------------------
  </code></pre>
  
  <p>I also uninstalled and re-installed libpng using brew (libpng 1.5.14). I then re-installed Pillow to make sure it built with it, though I think it uses zlib.</p>
  
  <p><strong>Update 3 trying to build Python 2.7.5</strong></p>
  
  <p>Perhaps the issue is with zlib, trying to compile Python 2.7.5 I get this:</p>
  
  <pre><code>Python build finished, but the necessary bits to build these modules were not found:
  _bsddb             _sqlite3           _ssl             
  bsddb185           dbm                dl               
  gdbm               imageop         linuxaudiodev    
  nis                ossaudiodev        readline        
  spwd               sunaudiodev        zlib
  To find the necessary bits, look in setup.py in detect_modules() for the module's name.
  
  
  Failed to build these modules:
  _tkinter
  </code></pre>