No commit activity in last 3 years
No release in over 3 years
a library for automated lossless image optimization
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

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.