Add comments; Remove do-nothing, do-nothing-pix

This commit is contained in:
Chinmay Pandhare
2017-08-21 10:01:02 +05:30
parent 54c7393417
commit cc308748c8
14 changed files with 20403 additions and 20327 deletions

View File

@@ -6,24 +6,35 @@ module.exports = function GreenChannel(options,UI) {
options = options || {};
options.title = "Invert Colors";
options.description = "Inverts the colors of the image";
// Tell UI that a step has been set up.
UI.onSetup(options.step);
var output;
//function setup() {} // optional
// The function which is called on every draw.
function draw(input,callback) {
// Tell UI that a step is being drawn.
UI.onDraw(options.step);
const step = this;
function changePixel(r, g, b, a) {
return [255-r, 255-g, 255-b, a];
}
function output(image,datauri,mimetype){
// This output is accessible by Image Sequencer
step.output = {src:datauri,format:mimetype};
// This output is accessible by UI
options.step.output = datauri;
// Tell UI that step has been drawn.
UI.onComplete(options.step);
}
return require('../_nomodule/PixelManipulation.js')(input, {
output: output,
changePixel: changePixel,
@@ -36,7 +47,6 @@ module.exports = function GreenChannel(options,UI) {
return {
options: options,
//setup: setup, // optional
draw: draw,
output: output,
UI: UI