# Manipulating Masks

Once you've created an initial mask in Fater's **Image Editor** using tools like the Brush, Rectangle, or Polygonal Lasso, you'll often need to refine or modify it. The **Inpaint Toolbar** provides several actions for manipulating your active mask.

***

### Accessing Mask Manipulation Actions

These actions are typically found as buttons with icons on the **Inpaint Toolbar** (floating on the left of the canvas).

***

### Common Mask Manipulations:

1. **Clear Mask (`X` icon 🚫):**
   * **Action:** Immediately removes the entire current mask from the canvas, leaving no area selected.
   * **Use Case:** To start over with a fresh mask or if you no longer need the current selection.
2. **Invert Mask ( `YinYang` icon):**
   * **Action:** Flips the masked and unmasked areas. Everything that was masked becomes unmasked, and everything unmasked becomes masked (within the Generation Area Bounding Box).
   * **Use Case:** Useful if it's easier to mask the area *around* your desired subject, then invert the selection to target the subject itself.
3. **Inflate / Deflate Mask (`Expand` icon ↔️):**
   * **Action:** Modifies the edges of your current mask by expanding (inflating) or shrinking (deflating) them by a set number of pixels.
   * **How to Use:**
     * **Inflate (Default):** Click the `Expand` icon to make your masked area larger by a small radius (e.g., 1 pixel).
     * **Deflate (Alt + Click):** Hold down the **Alt key** while clicking the `Expand` icon to make your masked area smaller by a small radius.
     * **Larger Step (Shift + Click):** Hold down the **Shift key** (with or without Alt) while clicking to inflate or deflate by a larger radius.
   * **Use Case:** Quickly making slight adjustments to mask coverage, ensuring edges are fully included, or creating a small border around a selection.
4. **Create Border Mask (`CircleDashed` icon ◌):**
   * **Action:** Transforms your current mask so that only the **edge pixels** of the originally masked area remain selected. The interior of the mask becomes unmasked.
   * **Use Case:** Creating outline effects, or for specific AI models that might use edge information from a mask.

***

### Combining Manipulations

You can use these manipulation actions in sequence to achieve complex selections:

* For example, you could create a rough mask, `Inflate` it slightly to ensure full coverage, then perhaps `Invert` it if you needed to select the background instead.

Remember to use the **Mask History** (Undo/Redo) if you make a manipulation you want to reverse.


---

# 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://fater.gitbook.io/fater-ai-docs/using-editing-and-masking-tools/manipulating-masks.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.
