pngdeer: Automated Lossy PNG Compression Using Rust and WebAssembly

Repositoryheydeer/pngdeerTool

pngdeer is an open-source PNG compressor written in Rust that automatically selects quality settings using perceptual metrics. Without manual quality sliders, it delivers files that are 8–12% smaller than TinyPNG at equivalent visual quality. It runs locally via CLI or in the browser using WebAssembly.

Key points

  1. Automatically searches palette sizes (2–256 colours) with and without dithering, scored against SSIMULACRA2 (capped at 90).
  2. Produces files 8–12% smaller than TinyPNG on median images at equivalent perceptual quality.
  3. Executes the same Rust codebase on macOS/Linux CLI and in the browser via multicore WebAssembly without uploading images.
  4. Supports images up to 40 megapixels in the browser and larger files on the command line.
  5. Free and open source under the MIT licence, including a reproducible benchmark suite against eight quantisers.

Why it matters

For web developers and DevOps pipelines, pngdeer delivers a privacy-friendly, zero-configuration replacement for cloud services like TinyPNG that works entirely offline.

Analysis

What It Does and Problem Solved

Lossy PNG compression usually involves tedious manual adjustments to balance colour banding, dithering, and file sizes. pngdeer removes quality sliders altogether. For every image, it dynamically tests palette configurations from 2 to 256 colours (with and without dithering), evaluating the output with the SSIMULACRA2 perceptual metric. It preserves the smallest file that maintains high visual fidelity (never exceeding a score of 90, which is visually identical at 1:1 scale).

Technology Stack

Built entirely in Rust, pngdeer is compiled both to native command-line binaries (macOS and Linux) and to WebAssembly for browser execution. The WebAssembly version utilises client-side multithreading across CPU cores, handling inputs up to 40 megapixels entirely within the browser without uploading any data to remote servers.

Audience and Maturity

Tested against 180 diverse images (icons, UI captures, illustrations, and photos), pngdeer outperformed TinyPNG and alternatives like pngquant, quantizr, and FFmpeg on compression ratio at matching fidelity. Licensed under MIT, it offers frontend engineers and operations teams an efficient, privacy-compliant drop-in tool for asset optimisation pipelines.

Found in

Summary generated by AI (Gemini 3.8 Flash, 28 October 2026). It may contain errors – the original source is authoritative.

Similar in content, found by the AI search.

  • Repository:Stirling-Tools/Stirling-PDF

    Stirling PDF: Self-Hosted Platform for PDF Editing and Document Workflows

    Stirling PDF is an open-source PDF manipulation platform designed to run as a desktop client, in a browser, or self-hosted on private servers. It provides over 50 tools, REST APIs, and no-code pipelines to process documents without relying on external cloud providers.

    91.3kstarsJava

    Automation· Tool

  • Repository:woelper/offgrid

    offgrid: Self-Contained All-in-One Local LLM Runtime in Rust

    offgrid is a portable single-binary Rust tool for downloading, running, and serving large language models completely offline. By compiling llama.cpp straight into the executable, it eliminates Python dependencies and external model servers. It provides developers with a telemetry-free, offline-ready AI environment for chat, coding agents, and API usage.

    4starsRust

    AI & LLMs· Tool

  • Repository:xerj-org/xerj

    XERJ: Rust-based search engine for AI agents and RAG

    XERJ is a Rust-based search engine designed as an alternative to Elasticsearch and grep for AI workflows. It provides zero-config auto-indexing for code, documentation, logs, and PDFs, aiming to significantly cut token usage for AI agents handling search, RAG, and memory tasks.

    7.9kstarsRust

    AI & LLMs· Tool

  • Repository:tursodatabase/turso

    Turso: Rust-Powered SQLite-Compatible In-Process SQL Database

    Turso is an open-source in-process SQL database written in Rust that provides SQLite compatibility and an experimental Postgres frontend. Dubbed the 'LLVM of databases', it compiles SQL into bytecode executed by an internal virtual machine.

    24.2kstarsRust

    Web development· Tool

Let's talk about your project

Locations

  • Mattersburg
    Johann Nepomuk Bergerstraße 7/2/14
    7210 Mattersburg, Austria
  • Vienna
    Ungargasse 64-66/3/404
    1030 Wien, Austria

Parts of this content were created with the assistance of AI.