Project

squeezem

0.0
No commit activity in last 3 years
No release in over 3 years
List pngs or jpgs which are bigger than they need to be. Can optionally compress them, but is designed mainly to keep an eye on a tree of images to make sure they stay in good shape.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme
List pngs or jpgs which are bigger than they need to be. Can
optionally compress them, but is designed mainly to keep an eye on a
tree of images to make sure they stay in good shape.

Prerequisites

At least one of pngcrush or jpegran.

On Mac:

  sudo port install pngcrush jpeg

On Ubuntu:

  sudo apt-get install pngcrush libjpeg-progs

Install

  sudo gem install squeezem

Usage

List files which could benefit from squeezing, suitable for running
from cron:

  squeezem path/to/images ...

Example output:

  test/apple.png
  test/banana.png
  test/pear.png
  ...
  11 files out of 12 could save 192972 out of 229834 (83.96)%. 17 files ignored.

Results of processing previously seen files are cached, so only new or
changed files are processed. The cache lives in ~/.squeezem-cache, and
is keyed by canonical filename, so you can pass different paths to the
same file and it will only be reprocessed when it changes.

eg. a.png will only be processed once:

  squeezem /web/images/a.png
  cd /web/images
  squeezem a.png

Squeeze 'em. Compresses files in-place:

  squeezem --squeezem .

Forces previously seen files to be reprocessed:

  squeezem --ignore-cache .

Related

http://github.com/grosser/smusher - does a similar job, but uses
online compression services.