Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.06 KB

README.md

File metadata and controls

40 lines (28 loc) · 1.06 KB

svg-padding-remover

Removes padding from svg files. Requires PhantomJS.

Demo

    before.svg         after.svg
+----------------+
|                |     ._______.
|    \  O  /     |     |\  O  /|
|     `-|-'      | ==> | `-|-' |
|      <->       |     |  <->  |
|                |     `▔▔▔▔▔▔▔` 
+----------------+

Or see these examples: before.svg, after.svg.

Installation

PhantomJS is required:

npm install -g phantomjs-prebuilt

Then just use it to run svg-padding-remover.js.

Usage

phantomjs svg-padding-remover.js path/to/image.svg > new.svg

Thanks

Thanks to all who participated in discussion.