# Inpainting

Inpainting is a technique used to modify or restore masked areas in an image. Depending on the strength of inpainting, it can serve two purposes. Firstly, it can be employed to create entirely new content within any region of an existing picture. Secondly, it can be used to subtly restore deformed parts of an image.

Let's look at a simple example of inpainting. We will use this image as a base image.&#x20;

<figure><img src="/files/PgCYTfjd9dluoJgwY2LQ" alt="" width="375"><figcaption><p>A girl with black hair, wearing school uniform, in classroom</p></figcaption></figure>

We will try to change her hair color by inpainting function. Follow the steps below:

1. Choose Inpaint Mode
2. Select a source image from your phone
3. Mask the hair area in the image
4. Enter "1girl, pink hair" in prompt

<div><figure><img src="/files/ViKln2k27N5G8hguHAoR" alt="" width="375"><figcaption><p>Select inpaint mode</p></figcaption></figure> <figure><img src="/files/iiVngZR5AopgbWk5JwRI" alt="" width="375"><figcaption><p>Mask hair area</p></figcaption></figure></div>

Now we can hit Start drawing button to see the result. The final output is absolutely awesome.

<figure><img src="/files/4GKyNQ7qlc5anDNKTI9B" alt=""><figcaption></figcaption></figure>


---

# 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://docs.dreamerland.ai/image/inpainting.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.
