2

Lets say I have some image that just have some shapes on white background

with knowing some x,y point I want to fill it with by replacing white inside the shape (if x,y is inside the shape)

Basically like image editors do it with paint bucket tool

enter image description here

is there something built-in ? if not - what coulbe the algorithm name for such case ?

Djangonaut
  • 5,511
  • 7
  • 40
  • 53

1 Answers1

2

Ok, seems a PIL.ImageDraw.floodfill can do the trick

Djangonaut
  • 5,511
  • 7
  • 40
  • 53