Added Docs, updated method names

This commit is contained in:
Chinmay Pandhare
2017-07-23 11:57:05 +05:30
parent cfdc4c509e
commit 7584b1ec45
12 changed files with 104 additions and 60 deletions

View File

@@ -6,14 +6,14 @@ module.exports = function GreenChannel(options,UI) {
options = options || {};
options.title = "Invert Colors";
options.description = "Inverts the colors of the image";
UI.setup();
UI.onSetup();
var output;
//function setup() {} // optional
function draw(input,callback) {
UI.drawing();
UI.onDraw();
var this_ = this;
function changePixel(r, g, b, a) {
@@ -21,7 +21,7 @@ module.exports = function GreenChannel(options,UI) {
}
function output(image,datauri,mimetype){
this_.output = {src:datauri,format:mimetype};
UI.drawn(datauri);
UI.onComplete(datauri);
}
return require('../_nomodule/PixelManipulation.js')(input, {
output: output,