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.
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.
I wish there was a function where I can tell python find edges and fill inside till edges
from PIL import Image, ImageFilter
image = Image.open('picture1.png')
image = image.filter(ImageFilter.FIND_EDGES).fill(yellow)
image.save('new_name.png')