summaryrefslogtreecommitdiff
path: root/rotord/src/cvimage.cpp
diff options
context:
space:
mode:
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;