{"id":15131250,"url":"https://github.com/chrissimpkins/crunch","last_synced_at":"2025-05-15T04:04:23.403Z","repository":{"id":6982711,"uuid":"55878380","full_name":"chrissimpkins/Crunch","owner":"chrissimpkins","description":"Insane(ly slow but wicked good) PNG image optimization","archived":false,"fork":false,"pushed_at":"2022-06-18T12:20:17.000Z","size":34611,"stargazers_count":3398,"open_issues_count":9,"forks_count":148,"subscribers_count":65,"default_branch":"master","last_synced_at":"2025-05-15T04:03:27.782Z","etag":null,"topics":["compression","image","image-compression","image-processing","image-quality","images","lossy","lossy-compression","macos","png","png-compression","pngquant","zopflipng"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrissimpkins.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-10T03:12:10.000Z","updated_at":"2025-05-14T09:57:21.000Z","dependencies_parsed_at":"2022-07-14T07:00:32.634Z","dependency_job_id":null,"html_url":"https://github.com/chrissimpkins/Crunch","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrissimpkins%2FCrunch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrissimpkins%2FCrunch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrissimpkins%2FCrunch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrissimpkins%2FCrunch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrissimpkins","download_url":"https://codeload.github.com/chrissimpkins/Crunch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254270641,"owners_count":22042858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["compression","image","image-compression","image-processing","image-quality","images","lossy","lossy-compression","macos","png","png-compression","pngquant","zopflipng"],"created_at":"2024-09-26T03:25:00.231Z","updated_at":"2025-05-15T04:04:23.359Z","avatar_url":"https://github.com/chrissimpkins.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/chrissimpkins/Crunch/raw/master/img/header-img-crunch.png\" alt=\"Crunch PNG file optimization\" width=\"250\"\u003e\u003cimg src=\"https://github.com/chrissimpkins/Crunch/raw/master/img/slowdots.gif\" alt=\"Crunch PNG file optimization\" width=\"100\"\u003e\n\u003cimg src=\"https://github.com/chrissimpkins/Crunch/raw/master/img/header-arrow-crunch.png\" alt=\"Crunch PNG file optimization\"\u003e\n\n[![GitHub release](https://img.shields.io/github/release/chrissimpkins/Crunch.svg?style=flat-square)](https://github.com/chrissimpkins/Crunch/releases/latest)\n![Linux Python CI](https://github.com/chrissimpkins/Crunch/workflows/Linux%20CI/badge.svg)\n![macOS Python CI](https://github.com/chrissimpkins/Crunch/workflows/macOS%20CI/badge.svg)\n![Lints](https://github.com/chrissimpkins/Crunch/workflows/Lints/badge.svg)\n![Benchmarks](https://github.com/chrissimpkins/Crunch/workflows/Benchmarks/badge.svg)\n\n## About\n\nCrunch is a tool for lossy PNG image file optimization.  It combines selective bit depth, color type, and color palette reduction with zopfli DEFLATE compression algorithm encoding using the pngquant and zopflipng PNG optimization tools.  This approach leads to a significant file size gain relative to lossless approaches at the expense of a relatively modest decrease in image quality (see [example images](#examples) below).\n\n[Continuous benchmark testing](https://github.com/chrissimpkins/Crunch/actions/workflows/crunch-bench.yml) is available in our GitHub Actions CI. Please see the benchmarks directory of this repository for details about the benchmarking approach and instructions on how to execute benchmarks locally on the reference images distributed in this repository or with your own image files.\n\nCrunch PNG image optimization is available through the following applications that are distributed in this repository:\n\n- [`crunch`](docs/EXECUTABLE.md) - a *nix command line executable that can be used on macOS, Linux, and Windows POSIX application deployment environments such as Cygwin or the Windows subsystem for Linux\n- [Crunch GUI](docs/MACOSGUI.md) - a native macOS drag and drop GUI tool\n- [Crunch Image(s)](docs/SERVICE.md) service - a macOS right-click menu service for PNG images selected in the Finder\n\n## Installation and Usage\n\nInstallation and usage documentation links for each of the Crunch applications are available below.\n\n## `crunch` Command Line Executable\n\nThe `crunch` command line executable can be installed with `make` or manually.  Please see the [Install documentation](docs/EXECUTABLE.md#install).\n\nEnter paths to your PNG image files as arguments to the `crunch` executable.  Please see the [Usage documentation](docs/EXECUTABLE.md#usage).\n\n## Crunch macOS GUI Application\n\nThe Crunch native macOS GUI application can be installed with Homebrew or the dmg installer that can be downloaded from the [repository releases](https://github.com/chrissimpkins/Crunch/releases/latest).  Please see the [Install documentation](docs/MACOSGUI.md#install).\n\nDrag and drop one or more images on the application window to process your PNG files.  Please see the [Usage documentation](docs/MACOSGUI.md#usage).\n\n## Crunch Image(s) macOS Right-Click Menu Service\n\nThe macOS right-click menu service \"Crunch Image(s)\" can be installed with `make` or manually by drag and drop in the macOS Finder. Please see the [Install documentation](docs/SERVICE.md).\n\nSelect one or more PNG images in the Finder, right-click, and select the `Services \u003e Crunch Image(s)` menu item to process your files.  Please see the [Usage documentation](docs/SERVICE.md).\n\n## Contents\n\n- [Examples](#examples)\n\t- [Photography Examples](#photography-examples)\n\t- [Illustration Examples](#illustration-examples)\n- [Issue Reporting](#issue-reporting)\n- [Licenses](#licenses)\n- [Contributing](#contributing)\n- [Acknowlegments](#acknowledgments)\n\n## Examples\n\nThe following examples demonstrate the benefits and disadvantages of the current iteration of Crunch's aggressive space saving optimization strategy.  The optimized image files are updated at every Crunch release.  In many cases, the PNG optimization decreases file size with an imperceptible impact on image quality.  In some cases, degradation of image quality is visible. Visual confirmation of image quality is highly recommended with lossy optimization tools in production settings.\n\n## Photography Examples\n\n### Cat Image\n\n- Original Size: 583,398 bytes\n- Optimized Size: 196,085 bytes\n- DSSIM similarity score: 0.001383\n- Percent original size: 33.61%\n\n##### Original\n\n\u003cimg src=\"https://github.com/chrissimpkins/Crunch/raw/master/img/cat-1285634_640.png\" alt=\"cat example pre optimization\"\u003e\n\n##### Optimized\n\n\u003cimg src=\"https://github.com/chrissimpkins/Crunch/raw/master/img/cat-1285634_640-crunch.png\" alt=\"cat example post optimization\"\u003e\n\n### Sun's Rays\n\n- Original Size: 138,272\n- Optimized Size: 66,593\n- DSSIM similarity score: 0.000920\n- Percent original size: 48.16%\n\n##### Original\n\n\u003cimg src=\"https://github.com/chrissimpkins/Crunch/raw/master/img/suns-rays-478249_640.png\" alt=\"sun rays example pre optimization\"\u003e\n\n##### Optimized\n\n\u003cimg src=\"https://github.com/chrissimpkins/Crunch/raw/master/img/suns-rays-478249_640-crunch.png\" alt=\"sun rays example pre optimization\"\u003e\n\n\n### Prairie Image\n\n- Original Size: 196,794 bytes\n- Optimized Size: 77,965 bytes\n- DSSIM similarity score: 0.002923\n- Percent original size: 39.62%\n\n##### Original\n\n\u003cimg src=\"https://github.com/chrissimpkins/Crunch/raw/master/img/prairie-679014_640.png\" alt=\"prarie example pre optimization\"\u003e\n\n##### Optimized\n\n\u003cimg src=\"https://github.com/chrissimpkins/Crunch/raw/master/img/prairie-679014_640-crunch.png\" alt=\"prarie example post optimization\"\u003e\n\n\n\n## Illustration Examples\n\n### Robot Image\n\n- Original Size: 197,193 bytes\n- Optimized Size: 67,596 bytes\n- DSSIM similarity score: 0.003047\n- Percent original size: 34.28%\n\n##### Original\n\n\u003cimg src=\"https://github.com/chrissimpkins/Crunch/raw/master/img/robot-1214536_640.png\" alt=\"robot example pre optimization\"\u003e\n\n##### Optimized\n\n\u003cimg src=\"https://github.com/chrissimpkins/Crunch/raw/master/img/robot-1214536_640-crunch.png\" alt=\"robot example post optimization\"\u003e\n\n### Color Circle Image\n\n- Original Size: 249,251 bytes\n- Optimized Size: 67,135 bytes\n- DSSIM similarity score: 0.002450\n- Percent original size: 26.93%\n\n##### Original\n\n\u003cimg src=\"https://github.com/chrissimpkins/Crunch/raw/master/img/colors-157474_640.png\" alt=\"colors example pre optimization\"\u003e\n\n##### Optimized\n\n\u003cimg src=\"https://github.com/chrissimpkins/Crunch/raw/master/img/colors-157474_640-crunch.png\" alt=\"colors example post optimization\"\u003e\n\n\n### Flowers Image\n\n- Original Size: 440,126 bytes\n- Optimized Size: 196,962 bytes\n- DSSIM similarity score: 0.001013\n- Percent original size: 44.75%\n\n##### Original\n\n\u003cimg src=\"https://github.com/chrissimpkins/Crunch/raw/master/img/flowers-67839_640.png\" alt=\"748\"\u003e\n\n##### Optimized\n\n\u003cimg src=\"https://github.com/chrissimpkins/Crunch/raw/master/img/flowers-67839_640-crunch.png\" alt=\"748\"\u003e\n\nAll images above were obtained from [Pixabay](https://pixabay.com) and are dedicated to the public domain under the [CC0 Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/).\n\nDSSIM testing was performed with v2.10.0 of the [kornelski/dssim tool](https://github.com/kornelski/dssim).\n\n## Issue Reporting\n\nHave you identified a problem? Please [create a new issue report](https://github.com/chrissimpkins/Crunch/issues/new/choose) on the Github issue tracker so that we can address it.\n\n## Licenses\n\nCrunch is licensed under the [MIT license](https://github.com/chrissimpkins/Crunch/blob/master/LICENSE.md).\n\n### Embedded Software\n\npngquant is licensed under the [Gnu General Public License, version 3](https://github.com/pornel/pngquant/blob/master/COPYRIGHT).  The pngquant source code is available [here](https://github.com/pornel/pngquant).\n\nzopflipng is licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).  The upstream zopflipng source code is available [here](https://github.com/google/zopfli).  The source for the modified zopflipng fork that is used in this project is available [here](https://github.com/chrissimpkins/zopfli).\n\nSee the [LICENSE.md](LICENSE.md) document for details and additional licensing information for this project.\n\n## Contributing\n\nContributions to the project are warmly welcomed.  Please suggest enhancements as new issue reports on this repository.  Source contributors should fork the git repository and submit changes as a Github pull request.\n\n## Acknowledgments\n\nCrunch is a simple tool that makes excellent, free, open source software built by others more accessible. The hard work on the optimization engines that run Crunch has been performed by:\n\n- Lode Vandevenne, Jyrki Alakuijala, and the [zopfli project contributors](https://github.com/google/zopfli/graphs/contributors)\n- Kornel Lesiński and the [pngquant project contributors](https://github.com/kornelski/pngquant/graphs/contributors)\n\nThe fantastic macOS GUI animations were designed by [Gary Jacobs](https://github.com/garyjacobs).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrissimpkins%2Fcrunch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrissimpkins%2Fcrunch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrissimpkins%2Fcrunch/lists"}