Fix minify Module (#1512)

* Fix minify Module

* fix minify module
This commit is contained in:
Rishabh Shukla
2020-01-22 02:55:34 +05:30
committed by Jeffrey Warren
parent 40dc23bedd
commit 2cd728b54c
4 changed files with 6 additions and 4 deletions

View File

@@ -54,12 +54,13 @@
"gpu.js": "^2.3.1",
"image-sequencer-invert": "^1.0.0",
"imagejs": "0.0.9",
"imagemin": "^7.0.0",
"imagemin": "^7.0.1",
"imagemin-jpegtran": "^6.0.0",
"imagemin-pngquant": "^8.0.0",
"imgareaselect": "git://github.com/jywarren/imgareaselect.git#v1.0.0-rc.2",
"istanbul": "^0.4.5",
"jasmine": "^3.4.0",
"jpegtran-bin": "^4.0.0",
"jquery": "^3.3.1",
"jsdom": "^15.0.0",
"jspdf": "^1.5.3",
@@ -69,6 +70,7 @@
"opencv.js": "^1.2.1",
"ora": "^4.0.3",
"pace": "0.0.4",
"pngquant-bin": "^5.0.2",
"puppeteer": "^1.14.0",
"qrcode": "^1.3.3",
"readline-sync": "^1.4.7",

View File

@@ -49,7 +49,7 @@ module.exports = function MinifyImage(options, UI) {
reader.readAsDataURL(result);
reader.onloadend = function () {
base64data = reader.result;
output(base64data, input.format);
output(null, base64data, input.format, false);
if (callback) callback();
return;
};
@@ -76,9 +76,9 @@ module.exports = function MinifyImage(options, UI) {
});
var destPath = __dirname + '/results/test.' + input.format;
var data = base64Img.base64Sync(destPath);
output(data, input.format);
output(null, data, input.format, false);
if (callback) callback();
})();
})().catch(e => console.log(e));
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 600 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

After

Width:  |  Height:  |  Size: 222 KiB