title: Why must I load a file instead of a custom surface when setting an icon?
body: <p>When running the code</p>
  <pre><code>pygame.display.set_icon(icon)
  </code></pre>
  <p>where <code>icon</code> is a custom <code>Surface</code>, meaning I filled parts of a surface, e.g. <code>icon.fill((255, 128, 0), (0, 0, 20, 10))</code></p>
  <p>The icon shows up as the backmost color which in my case is green, but when I save the icon to a file and load the image as the icon it works.</p>
  <p>CODE:</p>
  <pre><code>Map_Surface = pygame.Surface((20, 20))
  SKIN_DICT = {
      'Steve': (
          [(0, 255, 0), (0, 0, 20, 10)],
          [(0, 0, 0), (4, 4, 4, 4)],
          [(0, 0, 0), (12, 4, 4, 4)],
          [(255, 255, 255), (4, 4, 2, 2)],
          [(255, 255, 255), (12, 4, 2, 2)],
          [(128, 128, 128), (0, 10, 20, 7)],
          [(0, 0, 255), (0, 17, 20, 3)]
      )
  }
  
  
  def skin(name):
      for style in name:
          Map_Surface.fill(style[0], style[1])
  
  
  skin(SKIN_DICT['Steve'])
  </code></pre>
  <p>When I put <code>Map_Surface</code> into <code>pygame.display.set_icon(Map_Surface)</code> The icon gets set to a solid green square.</p>
  <pre><code>pygame.display.set_icon(Map_Surface)
  </code></pre>
  <p>But when I put <code>Map_Surface</code> into <code>pygame.image.save(icon, 'icon.png')</code> and then do <code>pygame.display.set_icon(pygame.image.load('icon.png')</code></p>
  <pre><code>pygame.image.save(Map_Surface, 'icon.png')
  pygame.display.set_icon(pygame.image.load('icon.png'))
  </code></pre>