Multithreaded lossless PNG and APNG optimizer written in Rust, usable as a command-line tool or a Rust library.
heydeer/slimdeer
A lossy PNG compressor with no quality slider that picks the smallest palette image still meeting a perceptual quality target, usable from the CLI or browser.
Open-source alternative to:TinyPNG
- Stars
- 507
- Forks
- 43
- Open issues
- 1
- Last commit
- 4 days ago
What is it?
pngdeer compresses PNG images by searching palette sizes from 2 to 256 colors, with and without dithering, and scoring each result with the SSIMULACRA2 perceptual metric. It keeps the smallest file that meets the target quality, so users don't set a quality slider. The project also writes WebP and re-encodes JPEG photos with mozjpeg at the lowest quality that holds the target.
It is available as a command line tool for macOS and Linux and as a web app compiled to WebAssembly, which runs the same Rust code in the browser so images are compressed on the user's device. Animated PNGs keep all frames on one palette and retain frame timing.
The project is written in Rust and released under the MIT license. Its benchmarks compare output size against TinyPNG at matched SSIMULACRA2 scores across a set of 180 test images.
Key features
- 01Chooses palette size and dithering automatically based on a perceptual quality score.
- 02Runs the same Rust code in the command line and in the browser via WebAssembly.
- 03Writes both PNG and WebP output from PNG input.
- 04Re-encodes JPEG photos with mozjpeg at the lowest quality that keeps the target.
- 05Keeps animated PNG frames on one palette with timing preserved.
Use cases
- Shrinking PNG assets for websites without manually tuning quality settings.
- Batch-compressing icons, UI screenshots and illustrations in a build or export step.
- Compressing images privately in the browser, since files never leave the device.
- Converting PNG assets to WebP while keeping visual quality.
Quick start
- 1
Install pngdeer with Homebrew
brew install heydeer/tap/pngdeer - 2
Compress a PNG with automatic quality
pngdeer input.png -o output.png
Things to know
- The command line runs on macOS and Linux only, though the browser version works elsewhere.
- Building from source requires the Rust toolchain and, for the browser version, the toolchain listed in web/build.sh.
In collections
Topics
FAQ
- What is slimdeer?
- A lossy PNG compressor with no quality slider that picks the smallest palette image still meeting a perceptual quality target, usable from the CLI or browser. pngdeer compresses PNG images by searching palette sizes from 2 to 256 colors, with and without dithering, and scoring each result with the SSIMULACRA2 perceptual metric. It keeps the smallest file that meets the target quality, so users don't set a quality slider. The project also writes WebP and re-encodes JPEG photos with mozjpeg at the lowest quality that holds the target.
- Is slimdeer free to use? What license does it have?
- slimdeer is open source under the MIT license. Check the license terms before using it in commercial products.
- Is slimdeer still maintained?
- Actively maintained. The last commit to slimdeer was on Nov 4, 2026.
- What can I use slimdeer for?
- Shrinking PNG assets for websites without manually tuning quality settings. Batch-compressing icons, UI screenshots and illustrations in a build or export step. Compressing images privately in the browser, since files never leave the device. Converting PNG assets to WebP while keeping visual quality.
- How do I install slimdeer?
- Install pngdeer with Homebrew: brew install heydeer/tap/pngdeer Compress a PNG with automatic quality: pngdeer input.png -o output.png
- Where can I get slimdeer?
- The source code and installation instructions are on GitHub: https://github.com/heydeer/slimdeer
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Desktop image compressor for Windows, macOS and Linux that shrinks JPG, PNG, WebP and TIFF files, optionally reducing resolution.
Privacy-first local image and GIF compression workbench for Web, Windows, macOS and Linux, with comparison, resizing, conversion and renaming.
Self-hosted Docker web toolbox for converting 70+ image formats, bulk compression, per-file cropping, and local AI background removal.
A browser-based image compressor that shrinks images across many formats entirely on your device, with no upload to a server.
A browser-based image compressor for JPG, PNG and WebP that works fully offline, so images never leave your device.