Implemented UI Methods

This commit is contained in:
Chinmay Pandhare
2017-07-22 02:01:03 +05:30
parent 557a1166b3
commit 555e37190b
14 changed files with 356 additions and 172 deletions

View File

@@ -1,19 +1,24 @@
/*
* This module extracts pixels and saves them as it is.
*/
module.exports = function DoNothingPix(options) {
module.exports = function DoNothingPix(options,UI) {
options = options || {};
options.title = "Do Nothing with pixels";
UI.setup();
var output;
function draw(input,callback) {
UI.drawing();
var this_ = this;
function changePixel(r, g, b, a) {
return [r, g, b, a];
}
function output(image,datauri,mimetype){
this_.output = {src:datauri,format:mimetype}
UI.drawn(datauri);
}
return require('../_nomodule/PixelManipulation.js')(input, {
output: output,
@@ -22,11 +27,13 @@ module.exports = function DoNothingPix(options) {
image: options.image,
callback: callback
});
}
return {
options: options,
draw: draw,
output: output
output: output,
UI: UI
}
}