summaryrefslogtreecommitdiff
path: root/rotord/src/cvimage.cpp
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2013-07-30 16:05:44 +0100
committerComment <tim@gray.(none)>2013-07-30 16:05:44 +0100
commit01f53fe4485b3c96c0f553e1cade69f77081b078 (patch)
tree5717695bbc7460ff7e41649c050c50ff6f786341 /rotord/src/cvimage.cpp
parent7fd8fbbf69631a868b8274a25023023cde141a4c (diff)
parentc2237c2116ca551c0755821beadae3fac54547e7 (diff)
Merge branch 'master' of eclectronics.org@eclectronics.org:rotor
Diffstat (limited to 'rotord/src/cvimage.cpp')
-rw-r--r--rotord/src/cvimage.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/rotord/src/cvimage.cpp b/rotord/src/cvimage.cpp
index c18c585..a03d81c 100644
--- a/rotord/src/cvimage.cpp
+++ b/rotord/src/cvimage.cpp
@@ -3,6 +3,13 @@
using namespace std;
namespace Rotor {
+ //space out to 32 bit RGB padding for cairo
+ void Image::convert24(){
+ cv::cvtColor(rgb,rgb, CV_RGBA2RGB);
+ }
+ void Image::convert32(){
+ cv::cvtColor(rgb,rgb, CV_RGB2RGBA);
+ }
Image & Image::operator+=(const Image &other) {
if (other.w!=w||other.h!=h) {
cerr<<"Rotor: cannot add images with different sizes! (wanted "<<w<<"x"<<h<<", got "<<other.w<<"x"<<other.h<<")"<<endl;