Categories

Image Boolean AND

Apply bitwise AND operation between two images to create intersection 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 AND 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 AND 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 AND tool allows you to perform a bitwise intersection between two images, effectively creating a mask that highlights only the overlapping areas where both input images contain data.

When to Use

  • When you need to isolate the common intersection area between two overlapping visual layers.
  • When creating custom transparency masks for graphic design or image editing projects.
  • When performing technical image analysis to identify shared pixel data between two source files.

How It Works

  • Upload your first image as the primary base layer.
  • Upload your second image to serve as the intersection reference.
  • Adjust the output format and quality settings if necessary.
  • Process the images to generate a new file containing only the intersecting pixel data.

Use Cases

Generating precise alpha masks for complex image compositing.
Extracting common shapes or patterns from two different graphical assets.
Comparing two visual datasets to visualize shared spatial information.

Examples

1. Creating a Custom Shape Mask

Graphic Designer
Background
The designer has a complex texture image and a specific silhouette shape they want to apply to it.
Problem
Need to crop the texture exactly to the silhouette shape without manual erasing.
How to Use
Upload the texture as the first image and the silhouette as the second image to perform the AND operation.
Outcome
A new image is generated that contains only the texture within the bounds of the silhouette.

2. Isolating Overlapping Regions

Data Analyst
Background
An analyst has two heatmaps representing different activity zones in a building.
Problem
Need to identify the exact area where both high-activity zones overlap.
How to Use
Upload both heatmap images and run the Boolean AND tool to extract the intersection.
Outcome
A clear visual mask showing only the high-activity zone shared by both datasets.

Try with Samples

image, png, jpg

Related Hubs

FAQ

What does the Boolean AND operation do to images?

It compares the pixel values of two images and keeps only the pixels that are present in both, effectively masking out non-overlapping areas.

Which file formats are supported?

You can upload JPEG, PNG, WebP, GIF, BMP, and TIFF files.

Why should I choose PNG as the output format?

PNG is recommended because it supports transparency, which is ideal for preserving the mask created by the intersection.

Is there a file size limit?

Yes, each uploaded image must be under 10MB.

Does this tool change the original images?

No, the tool processes copies of your files and generates a new result image without modifying your original uploads.

API Documentation

Request Endpoint

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

Request Parameters

Parameter Name Type Required Description
imageFile1 file (Upload required) Yes First image for AND operation
imageFile2 file (Upload required) Yes Second image for AND 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-and 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-and": {
      "name": "image-boolean-and",
      "description": "Apply bitwise AND operation between two images to create intersection mask",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=image-boolean-and",
      "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]