From a4429967730170ffff216dd556396f8a4627abc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juha=20Vehvil=C3=A4inen?= Date: Tue, 3 Jun 2003 21:09:13 +0000 Subject: *** empty log message *** svn path=/trunk/Framestein/; revision=676 --- Plugins/merge_mod.cpp | 66 +++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'Plugins/merge_mod.cpp') diff --git a/Plugins/merge_mod.cpp b/Plugins/merge_mod.cpp index 1aa9f16..b6bd214 100644 --- a/Plugins/merge_mod.cpp +++ b/Plugins/merge_mod.cpp @@ -1,33 +1,33 @@ -// -// merge_additive - add color components of two images, mod 255 -// - -#include "plugin.h" -#include "pixels.h" - -INFO("add color components of two images, modulus 255"); - -void perform_copy(_frame f1, _frame f2, _args a) -{ - arguments ar(a.s); - pixels p1(f1), p2(f2); - int r, g, b; - - float f = ar.count()>=1 ? atof(ar[0]) : 1; - - while(!p1.eof() && !p2.eof()) - { - r = (f * p1.red() + p2.red()); - g = (f * p1.green() + p2.green()); - b = (f * p1.blue() + p2.blue()); - - r = r % 255; - g = g % 255; - b = b % 255; - - p2.putrgb(r, g, b); - - p1.next(); - p2.next(); - } -} +// +// merge_mod - add color components of two images, mod 255 +// + +#include "plugin.h" +#include "pixels.h" + +INFO("add color components of two images, modulus 255"); + +void perform_copy(_frame f1, _frame f2, _args a) +{ + arguments ar(a.s); + pixels p1(f1), p2(f2); + int r, g, b; + + float f = ar.count()>=1 ? atof(ar[0]) : 1; + + while(!p1.eof() && !p2.eof()) + { + r = (f * p1.red() + p2.red()); + g = (f * p1.green() + p2.green()); + b = (f * p1.blue() + p2.blue()); + + r = r % 255; + g = g % 255; + b = b % 255; + + p2.putrgb(r, g, b); + + p1.next(); + p2.next(); + } +} -- cgit v1.2.1