Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

a library for automated lossless image optimization

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 CONTRIBUTORS
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 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.

Something went wrong with that request. Please try again.