Using PIL to fill empty image space with nearby colors (aka inpainting)

前端 未结 3 1469
一个人的身影
一个人的身影 2021-02-02 02:25

I create an image with PIL:

\"example

I need to fill in the empty space (depicted as black). I coul

3条回答
  •  臣服心动
    2021-02-02 02:50

    Depending on how you're deploying this application, another option might be to use the Gimp's python interface to do the image manipulation.

    The doc page I linked to is oriented more towards writing GIMP plugins in python, rather than interacting with a background gimp instance from a python app, but I'm pretty sure that's also possible (it's been a while since I played with the gimp/python interface, I'm a little hazy).

提交回复
热议问题