{"id":45084660,"url":"https://github.com/eddmann/turbo-png","last_synced_at":"2026-02-19T15:36:05.873Z","repository":{"id":324014334,"uuid":"1090458100","full_name":"eddmann/turbo-png","owner":"eddmann","description":"Fast Rust CLI for lossless PNG optimization and lossy compression with Zopfli and imagequant.","archived":false,"fork":false,"pushed_at":"2025-12-26T19:43:35.000Z","size":5523,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-28T09:35:49.604Z","etag":null,"topics":["cli","command-line-tool","compression","image-optimization","image-processing","imagequant","lossless","performance","pn","png","rust","zopfli"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eddmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-05T17:35:52.000Z","updated_at":"2025-12-26T19:43:38.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/eddmann/turbo-png","commit_stats":null,"previous_names":["eddmann/turbo-png"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/eddmann/turbo-png","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddmann%2Fturbo-png","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddmann%2Fturbo-png/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddmann%2Fturbo-png/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddmann%2Fturbo-png/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eddmann","download_url":"https://codeload.github.com/eddmann/turbo-png/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddmann%2Fturbo-png/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29620144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T13:04:20.082Z","status":"ssl_error","status_checked_at":"2026-02-19T13:03:33.775Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","command-line-tool","compression","image-optimization","image-processing","imagequant","lossless","performance","pn","png","rust","zopfli"],"created_at":"2026-02-19T15:36:05.177Z","updated_at":"2026-02-19T15:36:05.867Z","avatar_url":"https://github.com/eddmann.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TurboPNG\n\n![TurboPNG](docs/heading_compressed.png)\n\nTurboPNG is a high-performance Rust CLI for lossless optimization and size-focused PNG compression.\n\n\u003e Built after I got tired of uploading ChatGPT-generated PNGs to random compression websites, this CLI handles lossless and size-focused compression for those bloated outputs.\n\n## Quick Start\n\n```bash\nturbo-png path/to/image.png\n```\n\nThe default `optimize` mode keeps pixels identical while writing a new file next to the source (for example `image_optimized.png`).\n\n## Features\n\n- Two modes:\n  - `optimize`: maximally lossless transformation (metadata stripping, chunk reordering, DEFLATE refinement).\n  - `compress`: aggressive palette squeezing (≤32 colors by default) with filterless Zopfli for graphics; `--quality 98` unlocks a photo-friendly palette + adaptive filters.\n- Multi-file and directory processing with automatic recursion and deduplication.\n- Indicatif-based progress UI with optional quiet logging.\n- Chunk and metadata retention controls (`--keep-metadata`).\n- Atomic writes with `_optimized.png` / `_compressed.png` suffixes.\n- Dry-run summaries without touching disk.\n\n## Requirements\n\n- Rust 1.91+ (tracked via `rust-toolchain.toml`).\n- libclang toolchain (for `imagequant`, pulled automatically via Cargo).\n\n## Installation\n\n### Homebrew (Recommended)\n\n```bash\nbrew install eddmann/tap/turbo-png\n```\n\n### Prebuilt binaries\n\n1. Visit the [latest GitHub release](https://github.com/eddmann/turbo-png/releases) and download the archive that matches your platform. Release files follow the pattern `turbo-png-vX.Y.Z-\u003cplatform\u003e.tar.gz` (for example `macos-aarch64`, `linux-x86_64`, or `windows-x86_64`).\n2. Extract the archive:\n\n   - macOS / Linux:\n\n     ```bash\n     tar -xzf turbo-png-vX.Y.Z-macos-aarch64.tar.gz\n     ```\n\n   - Windows (PowerShell):\n\n     ```powershell\n     tar -xf .\\turbo-png-vX.Y.Z-windows-x86_64.tar.gz\n     ```\n\n3. Move the `turbo-png` binary (or `turbo-png.exe` on Windows) somewhere on your `PATH`, such as `/usr/local/bin`, `~/bin`, or `%USERPROFILE%\\AppData\\Local\\Microsoft\\WindowsApps`.\n4. Confirm everything works:\n\n   ```bash\n   turbo-png --version\n   ```\n\n\u003e **macOS Gatekeeper tip:** If macOS reports that `turbo-png` is from an unidentified developer, right-click the binary in Finder, choose **Open**, and confirm. Alternatively, remove the quarantine attribute:\n\u003e\n\u003e ```bash\n\u003e sudo xattr -dr com.apple.quarantine /path/to/turbo-png\n\u003e ```\n\n### Install with Cargo\n\nIf you prefer to build from source or need the latest commit:\n\n```bash\ncargo install --git https://github.com/eddmann/turbo-png.git --locked\n```\n\n### Build locally (development workflow)\n\n```bash\ngit clone https://github.com/eddmann/turbo-png.git\ncd turbo-png\ncargo build --release\n```\n\nThe compiled binary will be at `target/release/turbo-png`.\n\n## Usage\n\n```bash\nturbo-png [OPTIONS] \u003cPATH\u003e...\n```\n\n\u003e Working on the project locally? Use `cargo run --release --` as a drop-in replacement for `turbo-png` in the examples below.\n\n### Global Options\n\n| Flag                          | Description                                                            |\n| ----------------------------- | ---------------------------------------------------------------------- |\n| `--mode \u003coptimize\\|compress\u003e` | Select processing pipeline (default: `optimize`).                      |\n| `--keep-metadata`             | Preserve all ancillary chunks instead of stripping safe-only metadata. |\n| `--overwrite`                 | Replace existing `_optimized.png` / `_compressed.png` outputs.         |\n| `--threads \u003cN\u003e`               | Limit Rayon worker threads (defaults to logical CPU count).            |\n| `--no-progress`               | Disable the Indicatif UI and emit plain log lines instead.             |\n| `--dry-run`                   | Run the full pipeline without writing any files.                       |\n| `--zopfli`                    | Force exhaustive Zopfli DEFLATE even in optimize mode.                 |\n\n### Optimize Mode (Lossless)\n\nDelivers the tightest lossless PNG possible. Enable Zopfli for extra squeeze:\n\n```bash\nturbo-png --mode optimize --zopfli assets/logo.png\n```\n\nCreates `assets/logo_optimized.png` with identical pixels and improved size.\n\n### Compress Mode (Graphics-Focused)\n\nAims for the smallest PNGs on flat artwork by quantizing to a tight palette (typically ≤32 colors), disabling PNG filtering, and recompressing with Zopfli. Tune quality (1–100, default 90):\n\n```bash\nturbo-png --mode compress --quality 70 screenshots/*.png\n```\n\nOutputs `*_compressed.png`, reporting palette size, savings %, and runtime.\n\n\u003e Quality controls the palette cap (roughly 12–48 colors) and dithering strength. `--quality 98` activates a photo-friendly preset (≈96 colors + adaptive filters) for smoother gradients and photographic content.\n\n**Mode-specific flag**\n\n- `--quality \u003cLEVEL\u003e`: Palette quantization quality (1–100, default `90`).\n\n## Default Behavior\n\n### Metadata retention\n\nTurboPNG mirrors oxipng’s `--strip safe` policy, keeping display-critical metadata while removing unneeded ancillary chunks. Use `--keep-metadata` to preserve everything:\n\n```bash\n# Preserve all metadata verbatim\nturbo-png --keep-metadata image.png\n\n# Default behavior keeps ICC profiles, color space, and APNG animation data.\n```\n\n### Progress UI\n\nThe CLI renders a per-file spinner, an overall progress bar, and a summary line with original size, optimized size, savings, and runtime. Toggle quiet mode with `--no-progress` when running in CI.\n\n## License\n\nTurboPNG relies on `imagequant`, which is dual-licensed for GPL/commercial use. Consult upstream licensing before redistributing binaries. All additional project code is released under MIT unless otherwise noted.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddmann%2Fturbo-png","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feddmann%2Fturbo-png","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddmann%2Fturbo-png/lists"}