0.0.3 • Published 9 years ago

four-sides-1px-9patcher v0.0.3

Weekly downloads
3
License
WTFPL
Repository
github
Last release
9 years ago

four-sides-1px-9patcher

Automatically 9-patch image like this.

FourSide1px9patch.png

Dependencies

Automattic/node-canvas - https://github.com/Automattic/node-canvas

Installing node-canvas is bit difficult. Here is how to on mac.

$ brew install pkg-config
$ brew install pixman
$ brew install cairo
$ export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig

Installation

$ npm install four-sides-1px-9patcher

Usage

var fourSides1px9patcher = require('four-sides-1px-9patcher');
fourSides1px9patcher('src.png', 'dst.9.png');

License

WTFPL - http://www.wtfpl.net/