Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including ndpack-image with all npm packages installed. Try it out:

var ndpackImage = require("ndpack-image")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

ndpack-image v3.0.0

Package an image into a requireable module


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


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

ndpack-image test.img > test.js

Then load the test image:

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

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


npm install ndpack-image


(c) 2014 Mikola Lysenko. MIT License

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free