title: Load image in tkinter from pygame surface in python 3
body: <p>I would like to load an image in tkinter from a pygame surface and I am having a problem.</p>
  
  <p>This is what I am currently trying:</p>
  
  <pre><code>image= pygame.image.tostring(surf, 'RGB')
  tkimage= tkinter.PhotoImage(data= image)
  canvas.create_image(0, 0, tkimage)
  </code></pre>
  
  <p>but I unfortunately get this error:</p>
  
  <pre><code>_tkinter.TclError: couldn't recognize image data
  </code></pre>