Images, video, voice and music
Inpainting
In short
Inpainting is the process of filling a selected missing or unwanted area of an image so it blends with the surrounding scene. AI versions generate replacement pixels from nearby context, a text prompt, or both.
- Also called
- Image inpainting, Generative fill
- Topic
- Images, video, voice and music
- Level
- Beginner
- First described
- Marcelo Bertalmio, Guillermo Sapiro, Vicent Caselles and Coloma Ballester introduced their digital image-inpainting algorithm at SIGGRAPH in 2000.
An inpainting system receives an image and a mask, which marks the area to change. It estimates what belongs inside that region from the visible pixels around it, and may also follow an instruction such as "add a red umbrella". The output is a modified image, not a recovery of the exact original pixels12.
The idea predates modern generative AI. Bertalmio and colleagues' 2000 paper described digital inpainting as completing structures that arrive at the boundary of a selected region, with uses including restoring photographs and removing objects or overlaid text1. Newer generative systems can synthesise plausible content, including objects that were never present.
Inpainting is not the same as cropping, blurring or simply copying a nearby patch. It changes the selected area and can invent detail. If the mask covers a face, sign or complicated background, the result can look convincing while still being factually wrong about what was there2.
You see it in photo editors. Adobe Firefly lets a user brush over an unwanted object, select Remove, and choose among generated variations; its tools can also add elements or expand an image2. Similar controls are used to repair scratches, remove people from holiday photos, replace skies and edit product images.
Example
Circle a stranger in the background of a beach photo. Inpainting uses the sand, sea and nearby shapes to create a replacement area, so the finished picture appears to show an empty beach.
Why it matters
It makes precise image editing accessible without manually painting every pixel. Because it can fabricate plausible detail, an inpainted image should not automatically be treated as an unaltered record.
Questions people ask
Is inpainting the same as generative fill?
Generative fill is a product name or interface label for a type of generative inpainting. Both use a selected region and create replacement image content, but the exact method depends on the software2.
Can inpainting restore a damaged photograph exactly?
Usually not. It can estimate a plausible repair from surrounding information, but pixels that were permanently lost cannot be known from the image alone. The original technique was designed to complete structures, not recover hidden ground truth1.
What is an inpainting mask?
It is a map that tells the system which pixels may be changed. A brush, lasso or selection tool usually creates the mask. Pixels outside it provide context and are normally kept unchanged2.