# img2boxshadow.rb ### a ruby script to convert images to CSS (box-shadows) __Installation__ gem install rmagick # you'll need ImageMagick & Ruby first gem install colormath gem install micro-optparse __Usage__ How to run the script: ruby img2boxshadow.rb -i -o For large images, it's best to use an emulated pixel size, which takes _n_ amount of pixels and blends them into one. Your output will be __much__ smaller, but resolution will be lower. The following will combine a 4x4 pixel square into one box shadow statement. ruby img2boxshadow.rb -i -o -p 4 The [demo on CodePen](http://codepen.io/briangonzalez/details/AvrGI#pen-details-tab) uses the following settings: ruby img2boxshadow.rb -i img/woman_small.jpeg -o output.css -p 5 -s 3 -b 1 -g '#000' _Options:_ -p, --pixel-size 2 emulated pixel size -s, --pixel-spacing -1 pixel spacing -b, --blur 0 pixel blur -g, --background white background color -i, --input input file -o, --output output css -h, --help Show this message -v, --version Print version