Skip to content

didikeke/gm-base64

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

gm-base64

A plugin for gm node module, which converts img to base64 string

Installation

$ npm install gm-base64

Usage

With DataUri:

var gm = require('gm');
require('gm-base64');

var toDataUri = true;
gm('a.jpg')
  .resize(384)
  .toBase64('bmp', toDataUri, function(err, base64){
    console.log(base64);
  });

Without DataUri:

var gm = require('gm');
require('gm-base64');

gm('a.jpg')
  .resize(384)
  .toBase64('bmp', function(err, base64){
    console.log(base64);
  });

License

The MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published