Skip to content

Commit

Permalink
Fix minify Module (#1512)
Browse files Browse the repository at this point in the history
* Fix minify Module

* fix minify module
  • Loading branch information
rishabhshuklax authored and jywarren committed Jan 21, 2020
1 parent 40dc23b commit 2cd728b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions src/modules/MinifyImage/Module.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand All @@ -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));
}


Expand Down
Binary file modified src/modules/MinifyImage/images/test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/modules/MinifyImage/results/test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2cd728b

Please sign in to comment.