This commit is contained in:
Chinmay Pandhare
2017-07-08 03:05:24 +05:30
parent 4451e04b68
commit 10f9a19ca3
2 changed files with 2 additions and 2 deletions

View File

@@ -35307,7 +35307,7 @@ module.exports = function PixelManipulation(image, options) {
// there may be a more efficient means to encode an image object, // there may be a more efficient means to encode an image object,
// but node modules and their documentation are essentially arcane on this point // but node modules and their documentation are essentially arcane on this point
w = base64.encode(); w = base64.encode();
var r = savePixels(pixels, options.format, {quality: 100}); var r = savePixels(pixels, options.format);
r.pipe(w).on('finish',function(){ r.pipe(w).on('finish',function(){
data = w.read().toString(); data = w.read().toString();
datauri = 'data:image/' + options.format + ';base64,' + data; datauri = 'data:image/' + options.format + ';base64,' + data;

View File

@@ -45,7 +45,7 @@ module.exports = function PixelManipulation(image, options) {
// there may be a more efficient means to encode an image object, // there may be a more efficient means to encode an image object,
// but node modules and their documentation are essentially arcane on this point // but node modules and their documentation are essentially arcane on this point
w = base64.encode(); w = base64.encode();
var r = savePixels(pixels, options.format, {quality: 100}); var r = savePixels(pixels, options.format);
r.pipe(w).on('finish',function(){ r.pipe(w).on('finish',function(){
data = w.read().toString(); data = w.read().toString();
datauri = 'data:image/' + options.format + ';base64,' + data; datauri = 'data:image/' + options.format + ';base64,' + data;