# Image Boolean AND

Apply bitwise AND operation between two images to create intersection mask

> Canonical page: https://elysiatools.com/en/tools/image-boolean-and

- **Category:** Design

- **Keywords:** image, boolean, and, mask, intersection, bitwise, combine, overlay

## 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.

## Inputs

- **First Image** (file): First image for AND operation
- **Second Image** (file): Second image for AND operation
- **Output Format** (select): Output format for the result image (PNG recommended for transparency)
- **Quality (1-100)** (number): Output quality for lossy formats

## 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.

## Frequently asked questions

### 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.

## Related tools

- [Image Boolean OR](https://elysiatools.com/en/tools/image-boolean-or): Apply bitwise OR operation between two images to create union mask
- [Image Boolean XOR](https://elysiatools.com/en/tools/image-boolean-xor): Apply bitwise XOR operation between two images to create difference mask
- [Image Boolean NOT](https://elysiatools.com/en/tools/image-boolean-not): Apply bitwise NOT operation to invert all pixel values in an image
- [Image Trim Whitespace](https://elysiatools.com/en/tools/image-trim-whitespace): Remove whitespace and empty margins from images by detecting and trimming blank areas
- [Image Color Extractor](https://elysiatools.com/en/tools/image-color-extractor): Extract dominant colors from images using various algorithms including k-means clustering and histogram analysis
- [Image Difference](https://elysiatools.com/en/tools/image-difference): Calculate the difference between two images to identify changes or create comparison masks
- [Image Emboss Kernel](https://elysiatools.com/en/tools/image-emboss-kernel): Apply emboss convolution kernel to create 3D raised surface effects on images
- [Image Hue Adjustment](https://elysiatools.com/en/tools/image-hue): Adjust image hue to shift colors and create color effects

## Samples

- [Web Image Processing Python Samples](https://elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Web Image Processing TypeScript Samples](https://elysiatools.com/en/samples/web-image-processing-typescript): Web TypeScript image processing examples including image read/save, scaling, and format conversion
- [Android Image Processing Java Samples](https://elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
- [Android Image Processing Kotlin Samples](https://elysiatools.com/en/samples/android-image-processing-kotlin): Android Kotlin image processing examples including reading/saving images, scaling, and format conversion

## Related content

- [Binary Image Thresholding, Morphology, and Mask Tools](https://elysiatools.com/en/hubs/binary-image-thresholding-and-morphology): Turn images into binary masks, compare threshold methods, repair foreground shapes, and combine masks with morphological and Boolean operations.
