From 4d64e4cd434426234a5c313c151cd79b6afc299e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juha=20Vehvil=C3=A4inen?= Date: Sat, 6 Jul 2002 17:50:18 +0000 Subject: *** empty log message *** svn path=/trunk/Framestein/; revision=27 --- Plugins/rgbcopy.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Plugins/rgbcopy.cpp (limited to 'Plugins/rgbcopy.cpp') diff --git a/Plugins/rgbcopy.cpp b/Plugins/rgbcopy.cpp new file mode 100644 index 0000000..b226e23 --- /dev/null +++ b/Plugins/rgbcopy.cpp @@ -0,0 +1,28 @@ +#include +#include +#include "plugin.h" +#include "pixels.h" + +void perform_copy(_frame f1, _frame f2, _args a) +{ + pixels p1(f1), p2(f2); + char *t; + short r=0, g=0, b=0; + + if(!a.s) return; + + if(strstr(a.s, "r") || strstr(a.s, "R")) r=1; + if(strstr(a.s, "g") || strstr(a.s, "G")) g=1; + if(strstr(a.s, "b") || strstr(a.s, "B")) b=1; + + while(!p1.eof()&&!p2.eof()) + { + p2.putrgb( + r ? p1.red() : p2.red(), + g ? p1.green() : p2.green(), + b ? p1.blue() : p2.blue() + ); + p1.next(); + p2.next(); + } +} -- cgit v1.2.1