> For the complete documentation index, see [llms.txt](https://docs.ideogram.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ideogram.ai/canvas-and-editing/canvas/extend.md).

# Extend

Extend, also known as outpainting, lets you expand your image beyond its original edges. It can also modify existing parts of the image, similar to Magic Fill.

## How to Use Extend

{% hint style="info" %}
It is best to review the [Canvas](/canvas-and-editing/canvas/canvas-overview.md) page beforehand to gain a better understanding of its interface and various elements. This will help you more easily follow the steps in the examples shown below.
{% endhint %}

### Extending an Image

In the example below, the Extend function is used to generate a visual extension and add context that seamlessly blends around the main image.

<figure><img src="/files/EBHxLhOtHNr35iNvK5uu" alt="A young boy in green overalls and a white t-shirt smiling while biting into a chocolate chip cookie" width="375"><figcaption><p>Original image.</p></figcaption></figure>

Here's how to do it:

1. Open or import the image in Canvas.
2. Click the Extend button on the left-side panel.
3. Reposition and resize the Extend generation window around the original image, leaving empty space around it where you want to add to the original image.

<figure><img src="/files/vTJEV6ifes3w1XvU1tbW" alt="Extend frame with the boy&#x27;s photo in the top-left corner and empty pink space to the right and below"><figcaption><p>Placement of the original image within the frame and the empty space left around it.</p></figcaption></figure>

4. Write a detailed prompt containing all visual aspect of the final image you want.

Here's the prompt used: `A photo of a young boy holding a chocolate chip cookie beside a rustic kitchen table with a cookie jar full of cookies, a plate with two cookies and a glass of milk. He is wearing a white t-shirt and green overalls. The background is blurred, but it appears to be an indoor setting with a neutral color palette.`

5. Adjust any additional options, like Style and Magic Prompt, as desired.
6. Click Extend to generate the images.
7. Once the process is complete, you can cycle through the four generated images by selecting the generated image and clicking the left or right arrow in the menu at the bottom of the image.

<figure><picture><source srcset="/files/UyvnhG7Js0TykT815OAu" media="(prefers-color-scheme: dark)"><img src="/files/g0ecC8maYUqExBBbRWKJ" alt="Bottom menu showing image 4 of 4 with left and right arrows to cycle through the generated images" width="278"></picture><figcaption><p>Image selection in the bottom menu.</p></figcaption></figure>

Here's one of the four images that was generated:

<figure><img src="/files/zAFfzKsuGgmrkbyYiym9" alt="Extended result: the boy now beside a rustic table with a plate of cookies, a glass cookie jar and a glass of milk"><figcaption><p>Final image.</p></figcaption></figure>

Here's another example. This time, an image was extended in a panorama style format:

<figure><img src="/files/yFJHAKzcpOliTzRzPsjy" alt="Two deer drinking at the edge of a lake among trees with colorful autumn foliage, in portrait format" width="375"><figcaption><p>Original image.</p></figcaption></figure>

<figure><img src="/files/NoIHAKuKF2CgNXVIWZo3" alt="Wide banner-shaped extend frame with the deer photo placed at the right and empty pink space filling the left"><figcaption><p>The generation window is resized horizontally into a banner-like format, with the image strategically placed for a well-balanced composition.</p></figcaption></figure>

<figure><img src="/files/dRF22R1P3JJVQmY6sh14" alt="Panoramic result: an autumn lakeside landscape generated to the left of the two deer drinking at the shore"><figcaption><p>The final image.</p></figcaption></figure>

***

### Refining While Extending an Image

In this example, two modifications will be done at the same time:

* A man cutting vegetables will be added to the left side of the image.
* The glass of water will be changed into a cup of coffee.

<figure><img src="/files/VzujHQ0DnPVq7Sg2xWuV" alt="A short-haired woman in a blue shirt holding a glass of water at a wooden counter in a white kitchen" width="375"><figcaption><p>The original image to be modified.</p></figcaption></figure>

Here's how to do it:

1. Click the Extend button on the left-side panel.
2. Reposition and resize the Extend generation window to your liking, trying to keep the generation window as small as possible while keeping visual context for the AI to work with.
3. Mask the glass of water with the [Masking Tools](/canvas-and-editing/canvas/canvas-overview.md#masking-options) to indicate it should be replaced in the generated image.

<figure><img src="/files/dvCwFxrwey7wKNDr4xOM" alt="Extend window overlapping the photo, with the glass of water masked out and empty space added on the left"><figcaption></figcaption></figure>

4. Enter a prompt that describes:
   1. The part overlapping the original image.
   2. What should be generated where the image will be extended.
   3. The changes to be made to the masked areas.

Prompt used: `A photo of a middle-aged woman with short hair holding a cup of hot coffee in a modern, white kitchen with wooden countertops. She is wearing a blue shirt and a necklace. A man is chopping vegetables on the counter beside her.`

<figure><picture><source srcset="/files/Femhw0dE3pIRp07LMogE" media="(prefers-color-scheme: dark)"><img src="/files/nQzhhPqJUvqJirNihAI6" alt="Extend prompt box with the coffee scene prompt typed in and options for aspect ratio, model, Magic Prompt, Style and Color"></picture><figcaption></figcaption></figure>

5. Adjust any additional options as desired.
6. Click Extend to generate the images.
7. Select the image and use the arrows at the bottom to view all four generated options and choose the one you like.

<figure><img src="/files/UXIvfIalCaDBU2OlpCWr" alt="Result: a man chopping vegetables now appears on the left while the woman holds a cup of coffee instead of water"><figcaption><p>The resulting image after extending it on the left and changing a part of the original image.</p></figcaption></figure>

***

## Advanced and Creative Examples

The Extend tool can be used creatively to achieve impressive results. The examples below demonstrate how using the tool in creative ways can lead to surprising outcomes. For example, you can take an image of an object and create a whole environment around it.

{% hint style="warning" %}
The advanced techniques presented below sometimes push the tool to its limits. They are more about creative exploration and achieving good results can be challenging at times. Indeed, many factors influence the final rendering of the image like the prompt, the original image, the options used, etc.

Experimenting with prompts and different options is often essential, but even then, results may vary. If you encounter difficulties, you can ask for help in the [#prompt-w-friend](https://discord.com/channels/1106248220687994911/1145120589955223602) channel on our Discord server. Simply share your prompt, the generated image, and a brief description of the issue. Other users may be able to help you achieve better results.
{% endhint %}

### Generate Context Around an Object

In this example, a whole environment will be created around the image of a wine bottle.

Here's how to do it:

1. Upload or copy/paste your image in Canvas.
2. If possible, use the remove background tool to get a transparent background.
   1. Alternatively, you can mask out the areas around the object manually using the mask tools that will be available in the Extend tool after the next step.
3. Click the Extend tool on the left-side panel.
4. Reposition and resize the Extend generation window to your liking with the object inside the generation window.

<div><figure><img src="/files/xh69wwDUTfXC30HFFwHK" alt="A dark wine bottle with a black label reading Castle Cellars under a gold castle logo, on a plain background" width="375"><figcaption><p>The original wine bottle image.</p></figcaption></figure> <figure><img src="/files/MzHp4MMXzS64C9J4DyvG" alt="The bottle with its background removed, positioned on the left of the extend frame over empty pink space" width="375"><figcaption><p>Background removed and bottle placed in the generation window.</p></figcaption></figure></div>

5. Write a detailed prompt that describe the image to be generated in details. Prompt used: `A bottle of red wine labeled 'CASTLE CELLARS' is in a dimly lit room, featuring a wooden table and a candle. A glass of wine is near the bottle, and a cork is on the wooden surface. In the background, there are red and blue grapes. The label is embossed with intricate designs and the castle logo is prominently displayed in the center.`
6. Select the image and use the arrows at the bottom to view all four generated images and choose the one you like.

<figure><img src="/files/aMg8GO6BIHeEeq5wD6HU" alt="Generated scene: the Castle Cellars bottle on a table with a glass of red wine, a cork, candles and grapes" width="375"><figcaption><p>The final image of the bottle integrated into the decor.</p></figcaption></figure>

### Same Subject in Another Image Style

In the example below, a woman in a photo will be transformed into a caricature.

Here's how:

1. Open, upload or copy/paste your image in Canvas.
   1. It might be a good idea to have a good description of that image. If a prompt or description isn't already available, use the Describe feature to get one provided by the AI. It will be used later.

<figure><img src="/files/9GbyIcxEsh1nsMjCZu9U" alt="Portrait photo of a woman with long wavy light brown hair and round glasses, wearing a white shirt and dark blazer" width="375"><figcaption><p>Original image.</p></figcaption></figure>

2. Click Extend then resize an position the generation window in a way where the original image will be on one side and the other side will be about the same size as the original image.

<figure><img src="/files/PWP6Pdr7ElV4CoO9tiCn" alt="Extend frame covering the portrait on the left, with an equal area of empty pink space on the right"><figcaption><p>The generation window adjusted to overlap the original image and extend on the right side.</p></figcaption></figure>

3. Write a detailed prompt that describe both the original image and the image you want to generate.

Prompt used: `On the left, a woman with long, wavy, light brown hair and glasses. On the right, a hand drawn funny caricature portraying the same woman.`

Style used: General

4. Select the image and use the arrows at the bottom to view all four generated images and choose the one you like.

<figure><img src="/files/pXZ776uLcHqBCYw431tD" alt="Hand-drawn caricature of the same woman with an exaggerated smile, round glasses and long wavy hair" width="375"><figcaption><p>Final image as caricature.</p></figcaption></figure>

Here are other examples that were generated with the same technique, simply by changing the last part of the prompt and using appropriate style options.

<div><figure><img src="/files/FwiQI0JCxfni8utznATG" alt="Cartoon of the woman as a schoolgirl in a navy blazer, plaid skirt, knee socks and red bow, arms crossed"><figcaption><p>... a cartoon character showing the same woman as if she was a schoolgirl. <strong>Style used: General</strong></p></figcaption></figure> <figure><img src="/files/fMD5pU7QUS3B0meEoRkU" alt="3D chibi figure of the woman with an oversized head, big eyes, round glasses and a mustard hoodie on a cobblestone street"><figcaption><p>... a 3D character depicting the same woman as a chibi character. <strong>Style used: 3D</strong></p></figcaption></figure></div>

<div><figure><img src="/files/B2beHwAwzHBoqu153l9E" alt="Black and white coloring book page of the woman as a mermaid surrounded by fish and seaweed"><figcaption><p>... a kid's coloring book page showing the same woman as if she was a mermaid. <strong>Style used: Realistic</strong></p></figcaption></figure> <figure><img src="/files/43m92uk7lm3jzntAe6Va" alt="Pop art portrait of the woman with halftone shading, pink and purple hair, red lips and a teal background"><figcaption><p>... a pop art poster depicting the same woman as a pop art comic character. <strong>Style used: Design</strong></p></figcaption></figure></div>

***

## Tips and Tricks for Best Results

Achieving great results with **Magic Fill** and **Extend**, especially with advanced techniques, takes a mix of creativity, experimentation, and a bit of patience. Here are some key factors that can impact the final outcome:

* **Craft precise and detailed prompts** – Clarity in wording helps the AI understand what to generate.
* **Experiment with synonyms and rephrase** - Changing a few words or testing different ways of expressing the same idea in a prompt can make big difference.
* **Start with a high-quality image** – The better the input, the better the output.
* **Consider the complexity of the image** – Simpler modifications often yield more accurate results.
* **Optimize the generation window size** – Keeping it as small as possible while including enough context leads to sharper and more realistic outcomes.
* **Manage your expectations** – AI-generated results can vary, so refining your approach and testing different options is key to success.

By experimenting with different approaches, adjusting prompts, and fine-tuning generation settings, you can push the boundaries of what's possible and create stunning images.
