From 44c13aad4de51fc0d30992f5dccb053669fa29d6 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Wed, 17 Jul 2013 12:16:12 +0100 Subject: timed pixelcorps version of alpha_merge is faster than openCV --- rotord/cvimage.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'rotord/cvimage.cpp') diff --git a/rotord/cvimage.cpp b/rotord/cvimage.cpp index ca094d3..cb10fdd 100644 --- a/rotord/cvimage.cpp +++ b/rotord/cvimage.cpp @@ -33,8 +33,8 @@ namespace Rotor { } return *this; } - //THESE CAN BE OPTIMISED - LOOK INTO USING OPENCV HERE - Image & Image::alpha_blend(const Image &other) { + //THIS OPENCV VERSION IS SLOWER THAN THE OLDSKOOL VERSION BELOW + Image & Image::alpha_blend_cv(const Image &other) { if (other.w!=w||other.h!=h) { cerr<<"Rotor: cannot blend images with different sizes! (wanted "<>8)+((((int)other.rgb.data[i])*((int)other.alpha.data[i/3]))>>8)); } -- cgit v1.2.3