summaryrefslogtreecommitdiff
path: root/rotord/rotor.h
diff options
context:
space:
mode:
authorTim Redfern <tim@herge.(none)>2013-07-11 13:21:36 +0100
committerTim Redfern <tim@herge.(none)>2013-07-11 13:21:36 +0100
commitf758127362e3c1e4e926204a83ce3104af1278bb (patch)
tree8a859e2e174054edf93a816c7e25f6abcd869caf /rotord/rotor.h
parentedd05e4ad726c5aec6807a30dc9ff7de8f97b28b (diff)
cvimage fully incorporated
Diffstat (limited to 'rotord/rotor.h')
-rwxr-xr-xrotord/rotor.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/rotord/rotor.h b/rotord/rotor.h
index 3d260e4..953a69b 100755
--- a/rotord/rotor.h
+++ b/rotord/rotor.h
@@ -758,6 +758,7 @@ namespace Rotor {
if (_op=="/") op=ARITHMETIC_divide;
//if (_op=="%") op=ARITHMETIC_modulo; ??what would this even mean?
image=nullptr;
+ cerr<<"image_arithmetic: mode "<<op<<", value "<<value<<endl;
}
void link_params() {
for (auto p:parameter_inputs){
@@ -771,7 +772,8 @@ namespace Rotor {
Image *output(const Frame_spec &frame){
if (image_inputs.size()) {
if (image_inputs[0]->connection){
- if (image) image->free();
+ if (image) delete image; //from the previous frame- this may not be ideal
+ //because operator* made a new image it should be deleted
Image *in=(((Image_node*)image_inputs[0]->connection)->get_output(frame));
switch (op) {
case ARITHMETIC_plus:
@@ -1028,7 +1030,7 @@ namespace Rotor {
if (image_inputs.size()>1) {
if (image_inputs[1]->connection) {
//copy incoming image **writable
- if (image) image->free();
+ if (image) delete image;
image=(((Image_node*)image_inputs[0]->connection)->get_output(frame))->clone();
switch(mode){
case BLEND_screen:
@@ -1080,7 +1082,7 @@ namespace Rotor {
if (image_inputs.size()) {
if (image_inputs[0]->connection){
//copy incoming image **writable
- if (image) image->free();
+ if (image) delete image;
image=(((Image_node*)image_inputs[0]->connection)->get_output(frame))->clone();
switch (mode) {
case MIRROR_horiz: