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)
- Host: GitHub
- URL: https://github.com/null-none/node-image-base64
- Owner: null-none
- Created: 2016-09-05T23:01:39.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-01T07:02:44.000Z (over 9 years ago)
- Last Synced: 2025-02-26T12:51:13.676Z (about 1 year ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# node-image-base64
Nodejs module for convert image to base64 (blob, canvas)
[](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