Categories

Image Boolean XOR

Apply bitwise XOR operation between two images to create difference mask

Click to upload file or drag and drop file here

Maximum file size: 10MB Supported formats: image/jpeg, image/png, image/webp, image/gif, image/bmp, image/tiff

First image for XOR operation

Click to upload file or drag and drop file here

Maximum file size: 10MB Supported formats: image/jpeg, image/png, image/webp, image/gif, image/bmp, image/tiff

Second image for XOR operation

Output format for the result image (PNG recommended for transparency)

Output quality for lossy formats

Key Facts

Category
Design
Input Types
file, select, number
Output Type
file
Sample Coverage
4
API Ready
Yes

Overview

The Image Boolean XOR tool performs a bitwise exclusive OR operation on two images, effectively highlighting the differences between them by creating a precise visual mask.

When to Use

  • Identifying subtle pixel-level changes between two versions of an image.
  • Generating a difference mask to isolate unique elements present in one image but not the other.
  • Creating artistic visual effects by combining overlapping image data through bitwise logic.

How It Works

  • Upload your first and second images into the respective input fields.
  • Select your preferred output format, such as PNG for transparency support.
  • Adjust the quality slider if you are exporting to a lossy format like JPEG or WebP.
  • Process the images to generate and download the resulting XOR difference mask.

Use Cases

Comparing two UI design iterations to spot minor layout shifts.
Detecting modifications in security or surveillance snapshots.
Isolating unique visual artifacts in technical or scientific imaging.

Examples

1. UI Design Comparison

Frontend Developer
Background
A designer provided a new version of a landing page, but the developer needs to verify if the icon placement changed.
Problem
Visually identifying pixel-perfect alignment issues between two design mockups.
How to Use
Upload the original mockup as the first image and the updated version as the second image, then process.
Example Config
format: png
Outcome
The resulting image highlights only the pixels that differ, clearly showing the shifted icon position.

2. Image Integrity Check

Digital Archivist
Background
An archivist needs to ensure that a scanned document has not been altered during a digital transfer process.
Problem
Detecting any unauthorized pixel changes or data corruption in the scanned file.
How to Use
Upload the original scan and the transferred file to generate an XOR difference mask.
Example Config
format: png, quality: 100
Outcome
A blank output confirms the files are identical; any visible patterns indicate specific areas of alteration.

Try with Samples

image, png, jpg

Related Hubs

FAQ

What does the XOR operation do to images?

It compares the binary pixel values of two images; pixels that are identical result in black, while differing pixels appear as visible patterns.

Do the images need to be the same size?

Yes, for the best results, both images should have identical dimensions to ensure pixel-to-pixel alignment during the XOR operation.

Which output format should I choose?

PNG is recommended as it preserves transparency and offers lossless quality, which is ideal for masks.

Is there a file size limit?

Yes, each uploaded image must be under 10MB.

Can I use this for non-image files?

No, this tool is specifically designed for image formats including JPEG, PNG, WebP, GIF, BMP, and TIFF.

API Documentation

Request Endpoint

POST /en/api/tools/image-boolean-xor

Request Parameters

Parameter Name Type Required Description
imageFile1 file (Upload required) Yes First image for XOR operation
imageFile2 file (Upload required) Yes Second image for XOR operation
format select No Output format for the result image (PNG recommended for transparency)
quality number No Output quality for lossy formats

File type parameters need to be uploaded first via POST /upload/image-boolean-xor to get filePath, then pass filePath to the corresponding file field.

Response Format

{
  "filePath": "/public/processing/randomid.ext",
  "fileName": "output.ext",
  "contentType": "application/octet-stream",
  "size": 1024,
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
File: File

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-image-boolean-xor": {
      "name": "image-boolean-xor",
      "description": "Apply bitwise XOR operation between two images to create difference mask",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=image-boolean-xor",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

Supports URL file links or Base64 encoding for file parameters.

If you encounter any issues, please contact us at [email protected]