Adding pngcrush support to sprite-factory

Mon, May 2, 2011

I just made a minor update (1.0.1) to the sprite-factory gem to add support for reducing the size of the generated output image by using pngcrush. Should be easy enough to use, just pass the :pngcrush argument when you run the script:

sf images/icons --pngcrush

… or when using the library directly from ruby:

SpriteFactory.run!('images/icons', :pngcrush => true)

It has no effect if pngcrush is not available on your system. To install pngcrush for ubuntu:

sudo aptitude install pngcrush

Crush it!