From 028177c753f47ed80ba86aa1279a92df52925c25 Mon Sep 17 00:00:00 2001 From: Till Theato Date: Sat, 10 Sep 2011 14:33:06 +0000 Subject: [PATCH] Add update script for white balance effect svn path=/trunk/kdenlive/; revision=5905 --- effects/update/CMakeLists.txt | 1 + effects/update/frei0r.balanc0r.js | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 effects/update/frei0r.balanc0r.js diff --git a/effects/update/CMakeLists.txt b/effects/update/CMakeLists.txt index e1c421b4..c1a1dafa 100644 --- a/effects/update/CMakeLists.txt +++ b/effects/update/CMakeLists.txt @@ -1,5 +1,6 @@ INSTALL(FILES +frei0r.balanc0r.js frei0r.cartoon.js frei0r.curves.js frei0r.levels.js diff --git a/effects/update/frei0r.balanc0r.js b/effects/update/frei0r.balanc0r.js new file mode 100644 index 00000000..031c7481 --- /dev/null +++ b/effects/update/frei0r.balanc0r.js @@ -0,0 +1,11 @@ + +var update = new Object(); + +update["Green Tint"] = new Array(new Array(0.2, function(v, d) { return this.upd1(v, d); })); + +function upd1(value, isDowngrade) { + if (isDowngrade) + return value 1.0 + (2.5 - 1.0) * value; + else + return (value - 1.0) / (2.5 - 1.0); +} -- 2.39.2