Skip to content

stopdropandrew/image_squeeze

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

a library for automated lossless image optimization

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages