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

https://github.com/null-none/node-image-base64

Nodejs module for convert image to base64 (blob, canvas)
https://github.com/null-none/node-image-base64

Last synced: about 1 year ago
JSON representation

Nodejs module for convert image to base64 (blob, canvas)

Awesome Lists containing this project

README

          

# node-image-base64

Nodejs module for convert image to base64 (blob, canvas)

[![npm version](https://badge.fury.io/js/node-image-base64.svg)](https://www.npmjs.com/package/node-image-base64)

## Install

```bash
npm install node-image-base64
```

## Example

```javascript
var convert = require('node-image-base64'),
getBase64ImageBlob = convert.getBase64ImageBlob,
getBase64ImageCanvas = convert.getBase64ImageCanvas;

var url = 'http://lorempixel.com/400/200/';

getBase64ImageBlob(url, function(base64) {
console.log(base64);
});

getBase64ImageCanvas(url, function(base64) {
console.log(base64);
});
```

## License

MIT