Images

Crunch – lossy PNG image file optimization

Data compression is the process of storing data in a format that uses less space than the original representation would use. Compressing data can be very useful particularly in the field of communications as it enables devices to transmit or store data in fewer bits. Besides reducing transmission bandwidth, compression increases the amount of information that can be stored on a hard disk drive or other storage device.

Lossy compression is a data encoding method which reduces a file by discarding certain information. When the file is uncompressed, not all of the original information will be recovered. Lossy compression is typically used to compress video, audio and images, as well as internet telephony. The fact that information is lost during compression will often be unnoticeable to most users. Lossy compression techniques are used in all DVDs, Blu-ray discs, and most multimedia available on the internet.

Images take up massive amounts of internet bandwidth because they often have large file sizes. They are the most popular resource type on the web. According to the HTTP Archive, the majority of the data transferred to fetch a web page are images composed of JPEGs, PNGs and GIFs.

Crunch is a command line program that performs lossy optimization of one or more PNG image files with pngquant and zopflipng. It’s free and open source software.

Installation

There is a package named crunch in the Ubuntu repositories but that’s not an image file optimization program (in fact it generates wordlists). In the absence of an Ubuntu package, we took the manual installation approach.

Clone the project’s GitHub repository

$ git clone https://github.com/chrissimpkins/Crunch.git

Change into the newly created directory.

$ cd Crunch

Build and install the software with the commands:

$ make build-dependencies
$ make install-executable

The output from make build-dependencies is too long to reproduce, so we’ll settle for this image showing the final step.

Installing Crunch

Next page: Page 2 – In Operation and Summary

Pages in this article:
Page 1 – Introduction and Installation
Page 2 – In Operation and Summary

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Please read our FAQ before making a comment.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments