FLTK Image Array Manipulation

Posted by Cenoc on Stack Overflow See other posts from Stack Overflow or by Cenoc
Published on 2010-05-14T16:00:47Z Indexed on 2010/05/14 16:04 UTC
Read the original article Hit count: 364

Filed under:
|
|
|

Hello,

I was wondering if anyone knew how to redraw after altering the pixel array in fltk, basically, I have:

UI.OnlyBlue=false;
for(int i=0; i!=jpg.h()*jpg.w(); i++){
((uchar*)jpg.array)[3*i+1]=0;
((uchar*)jpg.array)[3*i+2]=0;
}
UI.ImageBox->set_changed();
UI.ImageBox->redraw();

I'm trying to only get the blue color to show up. I know that this change is registering, because when I do the desaturation, it gets darker when I first run it through this.

Any tips would be much appreciated!

Thanks.

© Stack Overflow or respective owner

Related posts about fltk

Related posts about image