# Image Local Contrast

Bring out detail in shadows and highlights with CLAHE, contrast limited adaptive histogram equalization. Instead of one global curve, the image is equalized within a sliding window of 8 to 128 pixels, and a contrast limit keeps noise and halos in check. Great for flat landscapes, hazy aerial shots, medical and scientific images, scanned documents and underexposed photos.

## Frequently asked questions

### What is CLAHE?

CLAHE stands for contrast limited adaptive histogram equalization. It spreads out the tones within each small neighborhood of the image instead of across the whole picture, so dark corners and bright skies both gain detail. The contrast limit stops it from amplifying flat areas and noise too much.

### What does the region size control?

The region size is the width and height in pixels of the window used to equalize each pixel, from 8 to 128. Small windows bring out fine texture, while larger windows give a gentler, more natural result closer to global equalization. The window is never larger than the image itself.

### What does the contrast limit do?

It caps the slope of the local histogram curve, from 0 to 100. Low values such as 2 or 3 give a subtle, natural enhancement and high values give a dramatic, gritty look. A value of 0 turns the limit off, which gives the strongest and noisiest result.

### Why is the region size capped at 128 pixels?

The processing time grows with the window size, and very large windows bring little visible benefit over 128 pixels on images up to 4000 pixels wide. The cap keeps every request fast. For an almost global effect, combine a 128 pixel window with a low contrast limit.

### Does it change colors?

Each color channel is equalized in its own window, so at moderate settings colors stay close to the original while contrast increases. With very high contrast limits colors can shift slightly as channels are stretched differently. Grayscale images are processed as one channel.

### Which images benefit the most?

Photos with low contrast in some areas, such as foggy landscapes, backlit portraits, underwater shots, X-rays, microscope images and faded scans. Images that already have strong contrast may look overprocessed, so keep the limit low for them.

### Is transparency kept?

Yes, the alpha channel is separated before the equalization and attached again afterwards, so transparent areas are not altered. Only the visible color is enhanced. The result is saved as PNG.

### What formats are supported?

Upload JPEG, PNG, GIF, WebP, TIFF or AVIF files up to 5 MB. Animated files use their first frame and images over 4000 pixels on a side are scaled down to fit. The output is a lossless PNG.

### How is this different from normalize or auto contrast?

Normalize stretches the whole image with one curve, so a bright sky can prevent the shadows from improving. Local contrast adapts to each region, lifting shadow detail and taming highlights at the same time. It is the better choice for scenes with mixed lighting.

### Which engine performs the equalization?

The tool uses the clahe operation of the sharp library, which runs on libvips. The processing is deterministic, so identical settings and files always give the same result.

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)
