# Difference Filter

## Description

Apply a Difference filter to an Image

{% tabs %}
{% tab title="Preview" %}
![](/files/8q0Bs5R7JFGVMfN4ZSSl)
{% endtab %}

{% tab title="Location" %}
**Name** | Difference Filter

**Nickname** | Difference

**Tab** | Bitmap

**Panel** | Filter

**Division** | 2
{% endtab %}

{% tab title="Inputs" %}
**I** | **Image** (*B+ Image, Bitmap*) | A Bitmap Plus Image or Bitmap

<mark style="color:blue;">**M**</mark> <mark style="color:blue;"></mark><mark style="color:blue;">|</mark> <mark style="color:blue;"></mark><mark style="color:blue;">**Mode**</mark> <mark style="color:blue;"></mark><mark style="color:blue;">(</mark>*<mark style="color:blue;">Integer</mark>*<mark style="color:blue;">) | Select filter mode</mark>

<mark style="color:orange;">**V**</mark> <mark style="color:orange;"></mark><mark style="color:orange;">|</mark> <mark style="color:orange;"></mark><mark style="color:orange;">**Parameter**</mark> <mark style="color:orange;"></mark><mark style="color:orange;">(</mark>*<mark style="color:orange;">Interval</mark>*<mark style="color:orange;">) |</mark> <mark style="color:orange;"></mark>*<mark style="color:orange;">This variable's use changes depending on the mode</mark>*

**B** | **Image** (*B+ Image, Bitmap*) | A Bitmap Plus Image or Bitmap
{% endtab %}

{% tab title="Ouputs" %}
**I** | **Image** (*B+ Image*) | A Bitmap Plus Image
{% endtab %}

{% tab title="Mode" %}
![](/files/S9AJm2ah8I4pcmsLkijU)

**Save Image** | Opens a file save dialog to save a raster file of the current image.

**Copy Image to Clipboard** | Copies the image to the clipboard (no alpha)
{% endtab %}
{% endtabs %}

### **Filter** Mode

<details>

<summary><strong>Filter</strong> Mode Enumerable</summary>

* Add = 0
* Subtract = 1
* Multiply = 2
* Divide = 3
* Merge = 4
* Flat Field = 5
* Intersect = 6
* Euclidean = 7
  * **V** | **Threshold** | Threshold Value Unitized adjustment value (0-1)
* Morph = 8
  * **V** | **Percent** | Percent Value Unitized adjustment value (0-1)
* Move Towards = 9
  * **V** | **Size** | Size Value Unitized adjustment value (0-1)
* Simple = 10
  * **V** | **Threshold** | Threshold Value Unitized adjustment value (0-1)

</details>

## Usage

### Difference Mode Samples

![Add](/files/nnYyZGFYZ1CQOZfqR7DK) ![Divide](/files/ETB9JA5kAEtCiLbWbBzP) ![Subtract](/files/0iGA2ilNrGLHpdWqiFyr)

![Flat Field](/files/gTu8cYYtR4aIDUvB7jDw) ![Intersect](/files/CDMzbB79kgqGNnTgx5NK) ![Merge](/files/hIVu0h8xfLXhYmeU1nBz)

![Morph](/files/jIEHWQMAbEHOhAhGF5CM) ![Move Towards](/files/X3lVQ5p0aRNO3amtjhuS) ![Multiply](/files/3vWrMs9aDy30QXWxOhf7)

![Simple](/files/n4xbfxPzSlDGAuhViQER) ![Euclidean](/files/9nzGCs0feIFFtBz63wxp)


---

# 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://interopxyz.gitbook.io/bitmap-plus/components/filter/difference-filter.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.
