a library for automated lossless image optimization
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.gitignore
CONTRIBUTORS
LICENSE
README.md
Rakefile

README.md

image_squeeze

A library for automated lossless image optimization

Installation

The default processors depend on ImageMagick, pngcrush, gifsicle, and jpegtran. ImageMagick is required for all processors.

gem install image_squeeze

Usage

# set up an ImageSqueeze with the default processors
squeezer = ImageSqueeze.new(:default_processors => true)

# in-place squeeze of our png
squeezer.squeeze!('my_logo.png')

# non-destructive squeeze
result = squeezer.squeeze('your_logo.png')
puts "result saved #{result.bytes_saved} bytes, new image located at #{result.output_filename}"

# move tmp file to final location
squeezer.finalize_results(result)

TODO

  • Command line runner

Copyright

Copyright (c) 2010 Andrew Grim. See LICENSE for details.