Improve Code Quality and Optimize (#763)

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>
This commit is contained in:
Varun Gupta
2019-02-16 11:05:32 +05:30
committed by GitHub
parent f42aa2fd67
commit 75dc23fb55
26 changed files with 1332 additions and 921 deletions

View File

@@ -17,9 +17,9 @@ module.exports = function Channel(options, UI) {
var step = this;
function changePixel(r, g, b, a) {
if (options.channel == "red") return [r, 0, 0, a];
if (options.channel == "green") return [0, g, 0, a];
if (options.channel == "blue") return [0, 0, b, a];
if (options.channel === "red") return [r, 0, 0, a];
if (options.channel === "green") return [0, g, 0, a];
if (options.channel === "blue") return [0, 0, b, a];
}
function output(image, datauri, mimetype) {