public
Fork of grosser/smusher
Description: Automatic Lossless Reduction Of All Your Images
Homepage:
Clone URL: git://github.com/mojombo/smusher.git
name age message
file .gitignore Sat Jan 24 06:14:39 -0800 2009 now singleton + cmd-line interface... [grosser]
file README.markdown Sun Jan 25 01:12:19 -0800 2009 refactoring + more documentation [grosser]
file Rakefile Mon Jan 26 09:49:26 -0800 2009 refactoring and better error handling, stdou on... [grosser]
directory bin/ Sun Jan 25 01:12:19 -0800 2009 refactoring + more documentation [grosser]
directory lib/ Mon Jan 26 14:31:22 -0800 2009 Fix type (sushing -> smushing) [mojombo]
file smusher.gemspec Mon Jan 26 09:49:26 -0800 2009 refactoring and better error handling, stdou on... [grosser]
directory spec/ Mon Jan 26 09:49:26 -0800 2009 refactoring and better error handling, stdou on... [grosser]
README.markdown

Problem

  • Images are too large because they are not optimized
  • Users & your bandwidth is wasted for useless metadata
  • local image optimization requires tons of programs / libaries / knowledge

Solution

  • LOSSLESS size reduction (10-97% size reduction) in the cloud
  • optmizes all images(jpg+png) from a given folder

Install

install ruby + rubygems + curl
sudo gem install grosser-smusher --source http://gems.github.com/

Usage

smusher /apps/x/public/images # optimize all jpg/png images, NOT gifs
smusher /apps/x/public/images/x.png # optimize a single image
smusher /apps/x/public/images/x.gif # !!optimize to smaller png, rename it yourself!!

Protection

Smusher makes .backup copies of any image before optimizing.
Any image that returns a failure code, is larger than before,
or is empty will be reverted.

Example

smusher /apps/ts/public/images
  sushing /apps/rs/public/images/social/facebook_icon.png
  2887 -> 132                              = 4%

  sushing /apps/rs/public/images/social/myspace_icon.png
  3136 -> 282                              = 8%

  sushing /apps/rs/public/images/dvd/dvd_1.png
  5045 -> 4                                = 0%
  reverted!
  ...

TODO

  • use rest-client rather than curl
  • windows support?

Author

Michael Grosser
grosser.michael@gmail.com
Hereby placed under public domain, do what you want, just do not hold me accountable...