That actually worked perfectly, thanks for the help, would you happen to know how to print it out as a jpeg to a file, or a bmp, or something that can be loaded later?
Thanks once again. (last question) > > On 14.05.2010, at 18:23, <[email protected]> <[email protected]> = > wrote: > > > I was wondering if anyone knew how to redraw after altering the pixel = > array in fltk, basically, I have: > > .. > > Fl_JPEG_Image jpg("logo.jpg"); > > .. > > for(int i=3D0; i!=3Djpg.h()*jpg.w(); i++){ > > ((uchar*)jpg.array)[3*i+1]=3D0; > > ((uchar*)jpg.array)[3*i+2]=3D0; > > } > > UI.ImageBox->set_changed(); > > UI.ImageBox->redraw(); > >=20 > > 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. > >=20 > > Any tips would be much appreciated! > > Look at Fl_RGB_Image.cxx, specifically at the "desaturate" code. You = > already tried it and know that it works. There are a few tricks = > involved, but basically you need to "uncache" the device dependent = > bitmap, so that a new cache is generated the next time the image is = > drawn. > > The simplest would be to copy Fl_RGB_Image::desaturate and modify the = > code to your needs.= > _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

