You have code to split out the RGB values from each pixel, so now you need some similar code to combine RGB values into a single int pixel. Between splitting them and re-combining them you can set r, g, and/or b to zero.
Or, you can use bi.getRaster().getDataBuffer(); to get direct (RW) access to the pixels, so you can modify and replace them one at a time. You can use & to zero out individual bytes each pixel.
JamesCherrill
Posting Genius
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073