Hello , i want to increase the brightness of my image without losing the bloom efffect, how can i achieve this ? So far if i increase my brightness i loose my overall transparency .Here is the code -
#include "testApp.h"
//--------------------------------------------------------------
void testApp::setup(){
ofBackground(100,100,255);
glow.loadImage("circle_gradient2.png");
glow.resize(400,400);
glow.setAnchorPoint(glow.getWidth()/2,glow.getHeight()/2);
}
//--------------------------------------------------------------
void testApp::setBrightness(int x){
unsigned char * pix = glow.getPixels();
for(int i = 0; i < glow.width * glow.height * 4; i++){
if(pix[i] != 0){
while(pix[i]<x){
pix[i] += 1;
}
}
}
glow.update();
}
//--------------------------------------------------------------
void testApp::update(){
}
//--------------------------------------------------------------
void testApp::draw(){
testApp::setBrightness(200);
glow.draw(ofGetWidth()/2,ofGetHeight()/2);
}
The original image (loaded in app because its white and will not be visible on the forum page)-
with increased brightness to 200 -
Thanks !