EditSafely

Calculate Image Tonal Entropy

Measure how much information the brightness and color levels of a PNG carry, as Shannon entropy in bits.

Runs on your device, nothing uploaded

Drop an image anywhere on this page

or paste with Ctrl / ⌘ + V ·

Accepts PNG

Your PNG files never leave this tab

Calculate Image Tonal Entropy is JavaScript that your browser has already downloaded, and it does the whole job on your own machine. On a normal site, 200 photos straight off a camera means 1.6 GB uploaded, a wait in somebody's queue, and 240 MB downloaded again. Here it means 0 bytes up and 0 bytes down.

  • No upload
  • No file size limit
  • Works offline once loaded
  • Nothing stored or logged

How to use Calculate Image Tonal Entropy

  1. 1. Add the PNG. Drop a PNG file. Its stored pixel values are read in your browser and each visible pixel is sorted into one of 256 brightness levels.
  2. 2. Read the entropy. The headline gives the Shannon entropy of the brightness histogram in bits, from 0 for a single flat tone up to 8 when all 256 levels are equally common.
  3. 3. Compare the channels. The red, green, blue and alpha figures, plus the entropy over full colors, show which part of the picture carries the variety.

When to use Calculate Image Tonal Entropy

Tonal entropy measures how unpredictable the brightness of a pixel is. A flat graphic with a few tones scores low, a detailed photo with every level in use scores close to 8 bits. Because it ignores where pixels sit and only counts how often each level occurs, it is a quick, standard measure of tonal complexity.

  • Predicting how well a picture compresses. Low entropy pictures compress very well with PNG and palettes, while high entropy ones stay large and are better candidates for lossy formats.
  • Comparing before and after an edit. Contrast stretching, posterising and denoising all change entropy, so comparing the numbers shows how much tonal variety an edit added or removed.
  • Checking for a nearly blank image. A scan or render that should contain detail but scores close to zero has almost no tonal variation and is probably blank or failed.

Examples

Detailed photo

Input

landscape.png

Output

Tonal entropy: 7.42 bits of 8 (high)

Flat graphic

Input

logo.png

Output

Tonal entropy: 1.37 bits of 8 (low)

About the Calculate Image Tonal Entropy tool

Calculate Image Tonal Entropy is a free online tool that works entirely inside your web browser. Measure how much information the brightness and color levels of a PNG carry, as Shannon entropy in bits. Because the processing happens on your own device, nothing you enter is uploaded, logged or stored anywhere.

This page is one of 292 PNG utilities on EditSafely. Each one does a single job well, and all of them follow the same rule: your input stays on your machine.

There is nothing to configure. Provide the input and the result appears on its own. 2 worked examples further down the page show exactly what the tool produces for real inputs.

Because nothing leaves your device, the tool is suitable for sensitive images such as ID scans, screenshots of internal systems or personal photos. It is also quick, since the pixels are processed on your own machine rather than by a remote API.

Frequently asked questions

Does Calculate Image Tonal Entropy cost anything?

Yes, it is completely free. All 2,943 tools on EditSafely work without an account, a subscription or usage limits.

Are my files uploaded to a server?

No data leaves your device. The whole tool is JavaScript that runs inside your browser tab, so there is no upload, no server-side processing and no log of what you did. If you disconnect from the internet after the page loads, it keeps working.

Which files does Calculate Image Tonal Entropy accept?

It accepts PNG images. There is no file size cap imposed by a server; very large files are limited only by your device's memory.

Do I need to sign up or install anything?

Nothing to install and no account needed. Open the page in any up-to-date browser, including on a phone or tablet, and the tool is ready.

How do I use the result?

Click Copy to put it on your clipboard, or Download .txt to save it as a file. Drop another image to start again.

Related tools

All PNG Tools →