Categories

Image Boolean OR

Apply bitwise OR operation between two images to create union 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 OR 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 OR 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 OR tool allows you to combine two images by applying a bitwise OR operation, effectively creating a union mask of the input files.

When to Use

  • When you need to merge two separate binary masks into a single unified shape.
  • When you want to combine overlapping visual elements from two distinct image layers.
  • When preparing image data for computer vision tasks that require union-based segmentation.

How It Works

  • Upload your first image file to serve as the primary base layer.
  • Upload your second image file to be combined with the first.
  • Select your preferred output format and adjust the quality settings if necessary.
  • Process the images to generate a new file containing the combined bitwise union.

Use Cases

Merging two separate black-and-white silhouette masks into one.
Combining distinct feature maps for image processing workflows.
Creating composite visual overlays for graphic design projects.

Examples

1. Merging Silhouette Masks

Graphic Designer
Background
The designer has two separate black-and-white masks representing different parts of a logo.
Problem
Need to combine these two masks into a single file to use as a unified stencil.
How to Use
Upload both mask images and select PNG as the output format to maintain transparency.
Example Config
format: png, quality: 100
Outcome
A single PNG file containing the union of both silhouettes, ready for use as a master stencil.

2. Combining Feature Maps

Data Scientist
Background
Working on a computer vision project with two separate binary maps of detected objects.
Problem
Need to create a single map that includes all detected objects from both sources.
How to Use
Upload both feature maps and run the Boolean OR operation.
Example Config
format: png
Outcome
A consolidated binary map showing all detected objects from both input files.

Try with Samples

image, png, jpg

Related Hubs

FAQ

What does the OR operation do to my images?

It compares the pixels of both images and keeps the pixel if it is present in either the first or the second image, creating a union of both.

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 integrity of masks and combined shapes.

Is there a file size limit?

Yes, each uploaded image file must be 10MB or smaller.

Can I adjust the output quality?

Yes, you can set the quality between 1 and 100 for lossy formats like JPEG or WebP.

API Documentation

Request Endpoint

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

Request Parameters

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