Find a pixel we changed

Two PNGs of the same rock pool. The right one went through Tidepool and came out 1,018,301 bytes lighter. Hover to look closer, click to mark a spot.Tap a photo to look closer.

original.png 3,172,871 bytes
tidepool.png 2,154,570 bytes 1,018,301 bytes lighter. The only thing we changed.

1 spot checked, 0 different

brew install tidepool

Where 1,018,301 bytes went

original.png was saved the way design tools often save it. The strip of photo in both bars is the same pixel data, byte for byte once decoded. None of what Tidepool removed was picture.

  • 538,563Lazy compression: no row filters and the fastest deflate setting. Tidepool tries all five PNG filters on every row, then the slowest deflate.
  • 360,444An alpha channel in which all 960,000 values were 255. Fully opaque, so Tidepool drops it.
  • 119,294Photoshop’s XMP edit history, 1,400 document ancestors long.

How it runs

One static binary for macOS, Linux or Windows. It needs no runtime and never sends a file anywhere.

brew install tidepool
cargo install tidepool

Or download a binary from the releases page.

On a folder

tidepool public/img

Output of tidepool on a folder of five images
before and afterfilebeforeaftersaved
rockpool.png3,172,8712,154,57032.1%
dashboard.png127,47069,06945.8%
og-card.png1,670,6101,151,46331.1%
icons.png38,9674,89087.5%
pool-thumb.webp838,684768,6028.4%
5 files5,848,6024,148,59429.1%

5 pairs, 0 pixels changed. Every pair above is another spot-the-difference you can’t win.

The icon sprite had four colors stored as full RGBA, so it became a palette image. The WebP was already lossless; Tidepool only re-encoded it harder.

While you export

tidepool --watch public/img

og-card.png as it arrivedog-card.png a moment later, identical

og-card.png lands from Figma at 1,670,610 bytes. A moment later it is

1,151,463 bytes with the same pixels.

Leave it running next to Figma. Every PNG, JPEG, WebP or AVIF that lands in the folder is shrunk in place.

In CI

- uses: example/tidepool@v1
  with:
    path: public/img

tidepool commented on the pull request

Shrunk rockpool.png and dashboard.png.

1,076,702 bytes saved, 0 pixels changed.

The GitHub Action shrinks the images a pull request adds and leaves that comment. It never fails a build.

Check it on your own machine

Download both files and let ImageMagick count the pixels that differ:

magick compare -metric AE original.png tidepool.png null:

It prints that zero. cmp will tell you the two files are different, and it’s right: one of them is 1,018,301 bytes shorter.

This page loads both files in full (5.3 MB) so your browser can run the comparison at the top of the page itself.

Questions

Is it really lossless?
Yes. Every pixel decodes to the same RGBA value it had before. Tidepool decodes its own output and compares it with your file before replacing anything; if one pixel differs, your file stays as it was.
Which formats?
PNG, JPEG, WebP and AVIF. PNGs from design tools shrink the most, usually 20–60%. JPEGs gain 3–12% from rebuilt Huffman tables and dropped metadata. WebP and AVIF files are already tight, so expect single digits.
Does it upload my images?
No. It’s a single binary that runs on your machine and makes no network requests.
What does it throw away?
Metadata browsers don’t render (EXIF, XMP, text chunks, timestamps), alpha channels that are fully opaque, and wasted compression. Color profiles stay, because dropping one can shift colors in color-managed browsers.
What’s the license?
MIT. Put it in the build scripts at work; nobody has to ask legal.