# What is 'Inpainting' & 'Outpainting' ?

Inpainting and outpainting are two techniques used in AI generative art to create new images by manipulating existing ones.

**Inpainting** refers to the process of filling in missing or damaged parts of an image. This can be done by using a variety of techniques, such as:

* **Patching:** The AI model can identify similar parts of the image and use them to patch up the missing areas.
* **Inpainting from scratch:** The AI model can generate new content that is consistent with the style and content of the existing image.

**Outpainting** refers to the process of extending an image beyond its original borders. This can be done by using a variety of techniques, such as:

* **Mirroring:** The AI model can mirror the existing content of the image to create new content.
* **Pattern extension:** The AI model can identify patterns in the existing image and extend them to create new content.
* **Outpainting from scratch:** The AI model can generate new content that is consistent with the style and content of the existing image, but that is not simply a copy of the existing content.

Both inpainting and outpainting can be used to create a variety of artistic effects. For example, inpainting can be used to restore damaged works of art, while outpainting can be used to create new and original works of art.

Here are some additional things to keep in mind about inpainting and outpainting:

* The quality of the results of both inpainting and outpainting can vary depending on the quality of the AI model and the quality of the image being used.
* Inpainting can be more challenging than outpainting, as the AI model has to be able to infer what the missing content should look like.
* Outpainting can be more creative than inpainting, as the AI model has more freedom to generate new content.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://metaverse-imagen.gitbook.io/ai-tools-research/about-ai-tools-research/frequently-asked-questions-faqs/what-is-inpainting-and-outpainting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
