AI image glossary
What is inpainting?
Regenerating a masked region inside an image while leaving everything outside the mask untouched. The basis of object removal and targeted editing.

Surrounding pixels are the model’s only context
The model generates content for your masked region using what surrounds it as the guide. That is why difficulty depends almost entirely on the background: a plain wall has one plausible answer, a bookshelf has many, and any wrong guess in structured detail is immediately visible.
Mask edges matter more than mask accuracy
A hard edge produces a visible boundary where the regenerated grade meets the original. Feathering blends the two and hides almost every seam, which is why masking slightly larger than the object and softening the edge beats a precise tight selection.
The shadow everyone forgets
Removing an object without its shadow leaves a physical impossibility. The eye catches it instantly even when the viewer cannot articulate what is wrong with the picture, and it is the single most common reason an otherwise clean removal looks fake.
Its counterpart, outpainting
Outpainting generates beyond the original frame edges rather than inside them. It is the same operation aimed at a different area, used to extend a photograph to a wider aspect ratio without cropping into the subject.
Inpainting at a glance
- Edits
- Inside a mask
- Leaves alone
- Everything outside it
- Needs
- A source image
- Opposite of
- Outpainting
- Best for
- Removing or replacing objects
- Weak at
- Large structural change
Related terms
What inpainting sits next to
Put it to use
Where this technique appears
- resize to exact pixels
- JPG, PNG and WebP
- shrink a file size
- image cropper
- colour picker from image
- background remover
- EXIF viewer
- build a prompt
- anime AI generator
- cartoonize a picture
- make pixel art
- best AI image generators
- compared with Midjourney
- compared with Leonardo
- compared with Ideogram
- Canva alternative for images
- reproducing an image
- denoise strength explained
- inpainting explained
- the LaFoto journal
Inpainting — questions people ask
- What is the difference between inpainting and outpainting?
- Inpainting regenerates a region inside the existing frame; outpainting generates new content beyond the original edges. Same operation, different area.
- Why is there a visible seam around my edit?
- The mask edge was too hard, or the regenerated region landed at a slightly different exposure. Feather the mask and match exposure afterwards.
- Should I mask tightly around the object?
- No — mask slightly larger and feather the edge. A precise tight mask makes the boundary more visible, not less.
- Why does inpainting fail on patterned backgrounds?
- The model must invent specific repeating structure from context, and any small error in alignment or spacing is immediately obvious to the eye.
- Does inpainting change the rest of my image?
- No. Outside the mask the original pixels are preserved exactly, which is the entire point of the technique.
- Can I inpaint more than once?
- Yes, and working in several small passes often beats one large mask, because each pass gives the model more surrounding context to work from.
Related AI image terms
Start creating today
Generate your first image with the best AI image generator.
Turn a sentence into a finished, photorealistic image in seconds — then refine every detail. No setup, no Discord, no GPU.
Join 4,200+ creators using LaFoto