EditSafely

Calculate Image Center of Mass

Find the weighted center point of the content in a PNG by opacity, darkness or brightness, and mark it on the picture.

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 Center of Mass 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 Center of Mass

  1. 1. Add the PNG. Drop a PNG file. The stored pixels are read in your browser; nothing is uploaded and the picture is not changed.
  2. 2. Choose what counts as weight. Opacity suits a cutout on transparency, Darkness suits dark artwork on a light background, and Brightness suits light shapes on a dark one.
  3. 3. Read the result. A red ring marks the center of mass and a grey cross marks the canvas center. The coordinates and the offset in pixels are listed beside the picture.

When to use Calculate Image Center of Mass

The center of mass is the average position of all pixels, each weighted by how much it counts: its opacity, its darkness or its brightness. Unlike the middle of a bounding box, it shifts toward wherever the content is heaviest, which is close to where the eye feels the visual center of a shape sits.

  • Checking whether a logo looks centered. An asymmetric mark can be centered by its box and still look off. The offset figure tells you how far the visual weight sits from the middle.
  • Placing a graphic by its visual center. Use the coordinates to align an icon, a badge or a product cutout in a layout tool by its weight instead of its edges.
  • Measuring drift between frames. Comparing the center of mass of several frames or scans shows how much an object moved or how a crop shifted between them.

Examples

Logo on transparency

Input

logo.png

Output

Center of mass at x 241.6, y 198.3 (12.4 px right of center)

About the Calculate Image Center of Mass tool

Calculate Image Center of Mass runs as plain JavaScript in your browser tab, with no server behind it. Find the weighted center point of the content in a PNG by opacity, darkness or brightness, and mark it on the picture. Whatever you put in stays on your device from start to finish.

The tool is part of EditSafely's PNG Tools section, 292 single-purpose utilities built around the same idea: open the page, get the result, keep your data to yourself.

You can shape the output with the Weigh pixels by setting; the result is redone automatically when you change one. A worked example further down the page shows exactly what the tool produces for a real input.

That local-first design has practical benefits beyond privacy. The tool keeps working on a flaky connection once the page has loaded, there is no upload to wait for, and it is safe to use with confidential photos and documents.

Frequently asked questions

Does Calculate Image Center of Mass 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 Center of Mass 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.

Can I save what the tool produces?

Yes. Use the download or copy controls in the output panel to keep the rendered result once it looks the way you want.

Related tools

All PNG Tools →