From a0b504d11542097843db77653d3e26516a892593 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Mon, 10 Sep 2018 23:24:49 +0100 Subject: lut blend --- gui/src/chainImage.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'gui/src/chainImage.h') diff --git a/gui/src/chainImage.h b/gui/src/chainImage.h index 30ea55a..3763aab 100644 --- a/gui/src/chainImage.h +++ b/gui/src/chainImage.h @@ -3,7 +3,7 @@ #include "ofMain.h" #include "ofxJSON.h" #include "ofxEasing.h" -#include "ofxGpuLut.h" +#include "ofxGpuLutBlend.h" #define min(a,b) ((a) < (b) ? (a) : (b)) #define max(a,b) ((a) > (b) ? (a) : (b)) @@ -47,7 +47,7 @@ class chainImage : public ofImage{ filename=_filename; if (ofImage::load(filename)){ makeThumbnail(); - + //setImageType(OF_IMAGE_COLOR_ALPHA); //could there be a way to load without committing the texture //setUseTexture(false); setAnchorPoint(getWidth()/2,getHeight()/2); @@ -59,6 +59,20 @@ class chainImage : public ofImage{ return false; } + void setAlpha(uint8_t a){ + if (isAllocated()){ + ofPixelsRef pixels = getPixels(); + //uint8_t *im=(uint8_t *)&getPixels(); + for (int i=0;i