# Image Channel Boolean

Combine the red, green and blue values of every pixel with a bitwise AND, OR or XOR and get the result as one grayscale image. This low level operation reveals how channels overlap, creates glitchy graphic patterns and helps with masks, steganography experiments and teaching how digital color is stored in bits. The alpha channel of the original is kept.

## Frequently asked questions

### What does the tool calculate?

For each pixel it takes the 8-bit red, green and blue values and combines them with the chosen bitwise operator. The single result becomes the gray value of that pixel. A pixel with red 240, green 60 and blue 255 gives 48 with AND and 255 with OR.

### What do AND, OR and XOR do?

AND keeps only the bits set in all three channels, so the result is dark unless all channels are bright. OR keeps the bits set in any channel, so the result is bright if any channel is bright. XOR, also called eor, keeps bits set in an odd number of channels and produces striking banded patterns.

### Why does the result look posterized or banded?

Bitwise operations work on the binary representation of the numbers, not on their brightness, so small changes in color can flip high bits and cause jumps in the result. This is why XOR in particular gives contour like bands. It is expected behavior and the basis of many glitch art effects.

### What happens with a grayscale image?

A grayscale image is treated as three identical channels. AND and OR then return the original gray values and XOR also returns the same value, because an odd number of equal bits stays set. The operator is meaningful on color images.

### Is transparency preserved?

Yes, the alpha channel is set aside, the color channels are combined and the alpha is attached again. Transparent areas stay transparent in the grayscale result.

### What is this useful for?

It is useful for exploring how colors are encoded, building quick masks where all channels are bright, hiding or revealing bit patterns, and creating abstract artwork. Developers also use it to verify image processing pipelines.

### What is the output format?

The result is a lossless PNG that displays as grayscale. It keeps the dimensions of the upload after the 4000 pixel limit.

### Which formats can I upload?

Upload JPEG, PNG, GIF, WebP, TIFF or AVIF images up to 5 MB. Animated files use their first frame. Note that JPEG compression changes low bits, so results on JPEG files look noisier than on PNG.

### How is this different from Image Bitwise Blend?

This tool combines the channels within one image. Image Bitwise Blend combines two different images channel by channel with the same operators. Use that one to mix pictures and this one to analyze a single picture.

### What engine is used?

The tool uses the bandbool operation of the sharp library on libvips, which applies the operator across the bands of each pixel. The result is exact and deterministic.

Your ad here?

[Email us](mailto:hi@dennn.is?subject=Advertising%20on%20OneClick%20Pro)

[Ad The agent-ready plugin suite for WordPress.](https://sleekwp.com/?ref=oneclickpro)
