Removes padding from svg files. Requires PhantomJS.
before.svg after.svg
+----------------+
| | ._______.
| \ O / | |\ O /|
| `-|-' | ==> | `-|-' |
| <-> | | <-> |
| | `▔▔▔▔▔▔▔`
+----------------+
Or see these examples: before.svg, after.svg.
PhantomJS is required:
npm install -g phantomjs-prebuilt
Then just use it to run svg-padding-remover.js
.
phantomjs svg-padding-remover.js path/to/image.svg > new.svg
Thanks to all who participated in discussion.