Media Gen SolutionSupported image utilities
Inpainting
Edit and resort image to fix flaws or remove unwanted objects from an image.
Inpainting refers to the process of restoring or repairing an image by filling in missing or damaged parts. It is a valuable technique widely used in image editing and restoration, enabling the removal of flaws and unwanted objects to achieve a seamless and natural-looking final image. Inpainting finds applications in film restoration, photo editing, and digital art, among others.
Init Image
![](https://www.datocms-assets.com/45680/1706909031-b13ee16-dog.jpg?max-w=2000&auto=compress)
Output Image
![](https://www.datocms-assets.com/45680/1709376963-result_image0.jpg?max-w=2000&auto=compress)
Here is a Python example for inpainting. The Image Gen API call will take mask_image (right) and init_image (middle) as shown below.
Init Image
![](https://www.datocms-assets.com/45680/1706909031-b13ee16-dog.jpg?max-w=2000&auto=compress)
Inpainting Mask
![](https://www.datocms-assets.com/45680/1706909075-c984750-dogmask.jpg?max-w=2000&auto=compress)
Python
Output Image
![](https://www.datocms-assets.com/45680/1709376963-result_image0.jpg?max-w=2000&auto=compress)