Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mikolalysenko/ndpack-image

Package an image into a requireable module
https://github.com/mikolalysenko/ndpack-image

Last synced: about 2 months ago
JSON representation

Package an image into a requireable module

Awesome Lists containing this project

README

        

ndpack-image
============
Unpacks a base64 encoded string PNG. This is used for creating `require`-able images.

# Usage

First, take your image and pack it into a module:

```
ndpack-image test.img > test.js
```

Then load the test image:

```javascript
var myimage = require("./test.js")
```

If you want to publish your image on npm, be sure to add ndpack-image as a dependency.

# Install

```
npm install ndpack-image
```

# Credits
(c) 2014 Mikola Lysenko. MIT License