Equalize is not auto-contrast and it is not one result for a whole folder. One histogram pass changed 68.224% of 63,016,384 pixels across 11 readable files, but the per-file share ran from 0.374% on gray_16bit.png to 87.532% on photo_square.png — a 234.0-fold spread.
On photo_landscape.jpg equalization changed 7,921,068 pixels while auto-contrast, run on the same bytes, changed 0: that photo already reached both ends of the range. Equalization also used fewer distinct values, not more — red went from 256 levels to 142. Two independent runs wrote byte-identical files.
This page measures what one equalization decision does to a folder of mixed files. For other one-in-one-out operations on the same twelve files, see the batch invert measurement, the batch grayscale measurement and the batch sharpen measurement. For a rectangle across a folder, the batch crop measurement covers padding; for a blur radius family, the batch blur measurement covers three filters. For flipping, start at the photo flipper.
Twelve files, 20,934,926 bytes on disk and 63,016,384 pixels across the 11 that decoded. Every readable file received one histogram equalization with the same settings. Because the local equalize routine does not accept RGBA directly, each image was split into red, green, blue and alpha; the three colour channels were equalized and the untouched alpha was put back. Each output was written as a PNG, reopened from disk and compared with the decoded input, channel by channel. Eleven files times one pass equals 11 outputs; one truncated file produced nothing.
The same operation produces a different change rate on almost every file. The table lists each readable file's native size, pixel count, share of pixels changed, mean absolute channel shift and output size in bytes.
| File | Size | Pixels | Changed | Mean shift | Output bytes |
|---|---|---|---|---|---|
| photo_landscape.jpg | 4000 x 3000 | 12,000,000 | 66.009% | 25.77 | 12,723,945 |
| photo_portrait.jpg | 3000 x 4000 | 12,000,000 | 65.936% | 25.74 | 12,450,063 |
| photo_square.png | 3000 x 3000 | 9,000,000 | 87.532% | 27.73 | 12,391,762 |
| duplicate_photo.jpg | 3000 x 4000 | 12,000,000 | 65.936% | 25.74 | 12,450,063 |
| exif_orient6.jpg | 2000 x 1500 | 3,000,000 | 66.248% | 25.85 | 3,265,464 |
| screenshot.webp | 1600 x 900 | 1,440,000 | 66.757% | 25.93 | 1,473,183 |
| logo_alpha.png | 1200 x 800 | 960,000 | 53.46% | 31.51 | 8,342 |
| gray_16bit.png | 800 x 600 | 480,000 | 0.374% | 0.02 | 3,348 |
| gray_8bit.jpg | 3000 x 4000 | 12,000,000 | 65.697% | 21.6 | 5,713,203 |
| animation.gif | 400 x 300 | 120,000 | 8.333% | 4.58 | 1,159 |
| small_icon.png | 128 x 128 | 16,384 | 68.658% | 26.68 | 24,804 |
| broken.jpg | truncated, failed to decode; no output written | ||||
The two byte-identical portrait JPEGs produced byte-identical outputs, so their rows match. The largest share, 87.532%, belongs to photo_square.png; the smallest, 0.374%, to gray_16bit.png. Those two files sit 234.0-fold apart under one operation. Mean shift is the average absolute difference per colour channel on a 0 to 255 scale.
This is the gap most tool pages leave unmeasured. Auto-contrast remaps the darkest and lightest values to the ends of the range. Equalization remaps the whole cumulative distribution. On a photo that already spans the range, the first has nothing to do and the second still changes millions of pixels. Running both on the same decoded bytes makes the difference visible.
| File | Pixels | Equalize changed | Auto-contrast changed | Outputs differ by |
|---|---|---|---|---|
| photo_landscape.jpg | 12,000,000 | 7,921,068 | 0 | 7,921,068 |
| photo_square.png | 9,000,000 | 7,877,879 | 0 | 7,877,879 |
| gray_8bit.jpg | 12,000,000 | 7,883,619 | 0 | 7,883,619 |
| logo_alpha.png | 960,000 | 513,220 | 513,220 | 352,420 |
| small_icon.png | 16,384 | 11,249 | 0 | 11,249 |
On 4 of the 5 files tested, auto-contrast changed zero pixels. The flat logo is the exception: both operations touched it, and their outputs still differed on 352,420 pixels. Counting changed pixels says nothing about which looks better; it does say these two buttons are not interchangeable on these inputs.
Equalization is often described as spreading tones out. The measured level counts point the other way. Counting distinct values used in each channel before and after, the landscape photo's red channel fell from 256 to 142, green from 256 to 143, and blue from 256 to 120. A histogram that is already dense gets consolidated into fewer bins as it is flattened.
| File | Red before | Red after | Blue before | Blue after |
|---|---|---|---|---|
| photo_landscape.jpg | 256 | 142 | 256 | 120 |
| photo_portrait.jpg | 256 | 142 | 256 | 120 |
| photo_square.png | 256 | 180 | 256 | 148 |
| duplicate_photo.jpg | 256 | 142 | 256 | 120 |
| exif_orient6.jpg | 256 | 144 | 256 | 121 |
| screenshot.webp | 256 | 146 | 256 | 123 |
| logo_alpha.png | 3 | 3 | 3 | 3 |
| gray_16bit.png | 256 | 245 | 256 | 245 |
| gray_8bit.jpg | 256 | 157 | 256 | 157 |
| animation.gif | 2 | 2 | 2 | 2 |
| small_icon.png | 253 | 149 | 256 | 130 |
Distinct values are counted per channel on a 0 to 255 scale. Files that started with few levels, such as the two-colour GIF and the three-level logo, keep the same count. The 16-bit source is counted after conversion to RGBA, which is the stage the filter actually sees.
Equalization is monotonic, so it cannot create new darkest samples: the count at zero stayed exactly the same on every file counted. The top end is different. On photo_landscape.jpg the count of channel samples at 255 rose from 224,922 to 288,313, a gain of 63,391. On gray_8bit.jpg it rose from 1,815 to 62,019. The flat logo had no white samples at all before and 482,400 after.
| File | 255 before | 255 after | Zero before | Zero after |
|---|---|---|---|---|
| photo_landscape.jpg | 224,922 | 288,313 | 13,322,665 | 13,322,665 |
| gray_8bit.jpg | 1,815 | 62,019 | 12,347,328 | 12,347,328 |
| logo_alpha.png | 0 | 482,400 | 1,340,340 | 1,340,340 |
| small_icon.png | 68 | 242 | 16,811 | 16,811 |
Counts are of individual channel samples across red, green and blue, so one pixel can contribute up to three. A rising white count is a measured boundary effect, not a verdict on the image.
The routine accepts an optional mask built from an image of the same size. With no mask it changed 7,921,068 pixels on the 4000 x 3000 landscape photo. With a mask that was 255 on the left half and 0 on the right, it changed 7,922,050 — a difference of 982 pixels, or 0.0082% of the frame. The left half changed 3,957,242 pixels and the right half 3,964,808. The mask selects which pixels build the histogram; the resulting mapping is still applied to the whole image, which is why the right half moved too.
Conversion to RGBA and a one-still operation changed four file properties that a batch tool rarely reports. The six-frame GIF came back with one frame. The 16-bit grayscale PNG, whose source carried 65,536 distinct levels, passed through RGBA before filtering and came back 8-bit. The orientation tag on the portrait JPEG was not carried into the PNG output. The transparent logo kept its alpha channel byte for byte.
| File | Before | After | Note |
|---|---|---|---|
| animation.gif | 6 frames | 1 frame | animation not preserved |
| gray_16bit.png | 16-bit, 65536 levels | 8-bit via RGBA | depth reduced before filtering |
| exif_orient6.jpg | orientation 6 | no tag | tag not carried into PNG |
| logo_alpha.png | transparent regions | alpha byte-identical | alpha kept, RGB redistributed |
Eleven PNG outputs totalled 60,505,336 bytes against 20,934,926 bytes of input, or 2.89 times the source. The spread is wide by file: the landscape JPEG grew from 2,403,704 to 12,723,945 bytes, 5.293 times, while the 16-bit grayscale PNG fell from 12,042 to 3,348 bytes, 0.278 times. PNG is lossless, so a flatter distribution costs bytes where there is detail to encode.
Two independent full runs of the same 11 files each wrote the same 11 PNGs. Both flat trees hashed to SHA-256 6f0243434cabf64662b10b91b23cce1d2b851f203b88f36523837c407347037c. Determinism here means identical bytes, not identical speed: one full pass took 27,068 ms on this machine, and the two-run repeat check took 25,000 ms in total.
It remaps each channel so the cumulative distribution of its pixel values spreads across the available range. In this run one pass over 11 readable files changed 42,992,254 of 63,016,384 pixels, 68.224%. But equalization is not a stretch: on photo_landscape.jpg the red channel used 256 distinct levels before and only 142 after. The output used fewer levels, not more.
On the same file they are not close. On photo_landscape.jpg, equalization changed 7,921,068 of 12,000,000 pixels while autocontrast changed 0. Across 4 of the 5 files tested, autocontrast changed zero pixels because those images already reached both ends of the range. On the flat logo, both acted, but their outputs differed on 352,420 pixels. Equalization redistributes the middle of the histogram; autocontrast only stretches its endpoints.
It can push channel values to the boundary. Counting colour-channel samples on photo_landscape.jpg, the count at 255 rose from 224,922 to 288,313, a gain of 63,391. The count at zero did not move, which follows from a monotonic mapping: it cannot create new darkest samples. New white samples are a measured effect; whether the result looks over-processed is a judgement for you.
In this batch 11 of 12 files decoded: JPEG, PNG, WebP and GIF all opened, and a truncated JPEG failed. The output was always PNG, so format support on input is not format preservation on output. The six-frame GIF reopened with 1 frame. The 16-bit grayscale PNG had 65536 distinct levels in its source but passed through RGBA before filtering. The oriented JPEG lost its orientation tag: 6 before, none after.
Use it when the usable tones sit in a narrow band and you want them redistributed. The batch shows when it does very little: on gray_16bit.png only 0.374% of pixels changed, and on the two-level GIF 8.333%. Files with sparse levels have little to redistribute. The largest change was 87.532% on photo_square.png. The 234.0-fold gap between those extremes is why the same button is not the same operation across a folder.
Stretching maps the darkest and lightest existing values to the ends of the range. In this run autocontrast, the local equivalent, changed zero pixels on 4 of 5 files, because those images already spanned the full range. It changed 513,220 pixels on the flat logo, which did not. Equalization changed 7,921,068 pixels on the landscape photo where stretching changed none. The two operations are not substitutes.
Not from the data here. On gray_8bit.jpg the count of channel samples at 255 rose from 1,815 to 62,019. Equalization is monotonic, so samples already at the maximum stay there and more are pushed into it. A blown-out region carries no detail to recover in the first place. Whether a slightly different redistribution helps your particular sky is a judgement for you.
The measurement gives a reason to separate them. Auto-contrast changed nothing on 4 already-full-range files but equalization changed millions of pixels on the same files, so on these inputs they are different operations, not two labels for one. A manual control would let you choose the mapping; this batch applied one fixed mapping to every file. Which you prefer is your call; the numbers only show what each mapping did.
Yes, with the same per-file caveat seen in the sharpen batch. This run applied one equalization to 12 files; 11 decoded and each produced one output, 42,992,254 changed pixels in all. The share ranged from 0.374% on gray_16bit.png to 87.532% on photo_square.png. The truncated broken.jpg produced no output, so a batch result is a count of successes, not of inputs.