All Projects → chrissimpkins → Crunch

chrissimpkins / Crunch

Licence: other
Crunch 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 below).

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to Crunch

Essential Image Optimization
Essential Image Optimization - an eBook
Stars: ✭ 1,950 (-36.56%)
Mutual labels:  image-processing, images, png, image-compression, compression
Lerc
Limited Error Raster Compression
Stars: ✭ 126 (-95.9%)
Mutual labels:  image-processing, image, image-compression, compression
Flyimg
Dockerized PHP7 application runs as a Microservice to resize and crop images on the fly. Get optimised images with MozJPEG, WebP or PNG using ImageMagick. Includes face detection, cropping, face blurring, image rotation and many other options. Abstract storage based on FlySystem in order to store images on any provider (local, AWS S3...).
Stars: ✭ 762 (-75.21%)
Mutual labels:  image-processing, image, png, compression
Compress Images
Minify size your images. Image compression with extension: jpg/jpeg, svg, png, gif. NodeJs
Stars: ✭ 331 (-89.23%)
Mutual labels:  png, image-compression, pngquant, compression
Selene
A C++17 image representation, processing and I/O library.
Stars: ✭ 266 (-91.35%)
Mutual labels:  image-processing, image, images, png
pngloss
Lossy compression of PNG images
Stars: ✭ 73 (-97.63%)
Mutual labels:  png, png-compression, image-compression, lossy-compression
Imager
Automated image compression for efficiently distributing images on the web.
Stars: ✭ 266 (-91.35%)
Mutual labels:  image-processing, image, image-compression, compression
pngquant
A Python Wrapper of Pngquant
Stars: ✭ 27 (-99.12%)
Mutual labels:  png, png-compression, pngquant
Imgproxy
Fast and secure standalone server for resizing and converting remote images
Stars: ✭ 5,688 (+85.04%)
Mutual labels:  image-processing, image, png
Oblique
With Oblique explore new styles of displaying images
Stars: ✭ 633 (-79.41%)
Mutual labels:  image-processing, image, images
Cometa
Super fast, on-demand and on-the-fly, image processing.
Stars: ✭ 8 (-99.74%)
Mutual labels:  image-processing, image, images
Image Actions
A Github Action that automatically compresses JPEGs, PNGs and WebPs in Pull Requests.
Stars: ✭ 844 (-72.54%)
Mutual labels:  image-processing, image-compression, compression
Imagemin Module
Automatically optimize (compress) all images used in Nuxt.js
Stars: ✭ 37 (-98.8%)
Mutual labels:  image-processing, image, images
zImageOptimizer
Simple image optimizer for JPEG, PNG and GIF images on Linux, MacOS and FreeBSD.
Stars: ✭ 108 (-96.49%)
Mutual labels:  png, png-compression, image-compression
Resizer
An image resizing library for Android
Stars: ✭ 406 (-86.79%)
Mutual labels:  image-processing, image, image-compression
Gaussianblur
An easy and fast library to apply gaussian blur filter on any images. 🎩
Stars: ✭ 473 (-84.61%)
Mutual labels:  image-processing, image, image-compression
Sharp
High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.
Stars: ✭ 21,131 (+587.41%)
Mutual labels:  image-processing, image, png
Imaginary
Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing
Stars: ✭ 4,107 (+33.6%)
Mutual labels:  image-processing, image, png
Lilliput
Resize images and animated GIFs in Go
Stars: ✭ 1,690 (-45.02%)
Mutual labels:  image, images, png
Image Optimize Command
Easily optimize images using WP CLI
Stars: ✭ 138 (-95.51%)
Mutual labels:  image, pngquant, compression

Crunch PNG file optimizationCrunch PNG file optimization Crunch PNG file optimization

GitHub release Linux Python CI macOS Python CI Lints Benchmarks

About

Crunch 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 below).

Continuous benchmark testing is available on Travis CI (open the Benchmarks build for the commit of interest). 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.

Crunch PNG image optimization is available through the following applications that are distributed in this repository:

  • crunch - 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
  • Crunch GUI - a native macOS drag and drop GUI tool
  • Crunch Image(s) service - a macOS right-click menu service for PNG images selected in the Finder

Installation and Usage

Installation and usage documentation links for each of the Crunch applications are available below.

crunch Command Line Executable

The crunch command line executable can be installed with make or manually. Please see the Install documentation.

Enter paths to your PNG image files as arguments to the crunch executable. Please see the Usage documentation.

Crunch macOS GUI Application

The Crunch native macOS GUI application can be installed with Homebrew or the dmg installer that can be downloaded from the repository releases. Please see the Install documentation.

Drag and drop one or more images on the application window to process your PNG files. Please see the Usage documentation.

Crunch Image(s) macOS Right-Click Menu Service

The 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.

Select one or more PNG images in the Finder, right-click, and select the Services > Crunch Image(s) menu item to process your files. Please see the Usage documentation.

Contents

Examples

The 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.

Photography Examples

Cat Image

  • Original Size: 583,398 bytes
  • Optimized Size: 196,085 bytes
  • DSSIM similarity score: 0.001383
  • Percent original size: 33.61%
Original

cat example pre optimization

Optimized

cat example post optimization

Sun's Rays

  • Original Size: 138,272
  • Optimized Size: 66,593
  • DSSIM similarity score: 0.000920
  • Percent original size: 48.16%
Original

sun rays example pre optimization

Optimized

sun rays example pre optimization

Prairie Image

  • Original Size: 196,794 bytes
  • Optimized Size: 77,965 bytes
  • DSSIM similarity score: 0.002923
  • Percent original size: 39.62%
Original

prarie example pre optimization

Optimized

prarie example post optimization

Illustration Examples

Robot Image

  • Original Size: 197,193 bytes
  • Optimized Size: 67,596 bytes
  • DSSIM similarity score: 0.003047
  • Percent original size: 34.28%
Original

robot example pre optimization

Optimized

robot example post optimization

Color Circle Image

  • Original Size: 249,251 bytes
  • Optimized Size: 67,135 bytes
  • DSSIM similarity score: 0.002450
  • Percent original size: 26.93%
Original

colors example pre optimization

Optimized

colors example post optimization

Flowers Image

  • Original Size: 440,126 bytes
  • Optimized Size: 196,962 bytes
  • DSSIM similarity score: 0.001013
  • Percent original size: 44.75%
Original

748

Optimized

748

All images above were obtained from Pixabay and are dedicated to the public domain under the CC0 Public Domain Dedication.

DSSIM testing was performed with v2.10.0 of the kornelski/dssim tool.

Issue Reporting

Have you identified a problem? Please create a new issue report on the Github issue tracker so that we can address it.

Licenses

Crunch is licensed under the MIT license.

Embedded Software

pngquant is licensed under the Gnu General Public License, version 3. The pngquant source code is available here.

zopflipng is licensed under the Apache License, Version 2.0. The upstream zopflipng source code is available here. The source for the modified zopflipng fork that is used in this project is available here.

See the LICENSE.md document for details and additional licensing information for this project.

Contributing

Contributions 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.

Acknowledgments

Crunch 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:

The fantastic macOS GUI animations were designed by Gary Jacobs.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].