mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-14 04:10:04 +01:00
* add toCliString function fixes #140 Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * update docs Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * add test Signed-off-by: tech4GT <varun.gupta1798@gmail.com>
This commit is contained in:
committed by
Jeffrey Warren
parent
5ab018fb84
commit
5b4e904636
@@ -1,13 +1,13 @@
|
||||
/*
|
||||
* Display only one color channel
|
||||
*/
|
||||
module.exports = function Channel(options,UI) {
|
||||
module.exports = function Channel(options, UI) {
|
||||
|
||||
options.channel = options.channel || "green";
|
||||
|
||||
var output;
|
||||
|
||||
function draw(input,callback,progressObj) {
|
||||
function draw(input, callback, progressObj) {
|
||||
|
||||
progressObj.stop(true);
|
||||
progressObj.overrideFlag = true;
|
||||
@@ -15,15 +15,15 @@ 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 == "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 == "blue") return [0, 0, b, a];
|
||||
}
|
||||
|
||||
function output(image,datauri,mimetype){
|
||||
function output(image, datauri, mimetype) {
|
||||
|
||||
// This output is accesible by Image Sequencer
|
||||
step.output = {src:datauri,format:mimetype};
|
||||
step.output = { src: datauri, format: mimetype };
|
||||
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ module.exports = function Channel(options,UI) {
|
||||
return {
|
||||
options: options,
|
||||
//setup: setup, // optional
|
||||
draw: draw,
|
||||
draw: draw,
|
||||
output: output,
|
||||
UI: UI
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user