title: Python PIL Fill an image with a color outline
body: <p>I have a picture that is in PNG format with no background. What I am trying to do is fill this image with yellow only till the edges. Picture 1 is what I have and Picture 2 is what I want. <a href="https://i.stack.imgur.com/KE7CM.png" rel="noreferrer"><img src="https://i.stack.imgur.com/KE7CM.png" alt="picture 1"></a></p>
  
  <p><a href="https://i.stack.imgur.com/5qnPz.png" rel="noreferrer"><img src="https://i.stack.imgur.com/5qnPz.png" alt="enter image description here"></a></p>
  
  <p>I am not really sure how to achieve this goal or how to start it. because both the background and the inside of the pic is transparent. </p>
  
  <p>I wish there was a function where I can tell python find edges and fill inside till edges</p>
  
  <pre><code>from PIL import Image, ImageFilter
  
  image = Image.open('picture1.png')
  image = image.filter(ImageFilter.FIND_EDGES).fill(yellow)
  image.save('new_name.png') 
  </code></pre>