posted 21 years ago
Here's a simple example of how to swap single colors in images. In my class "face.png" is just an image I drew of a face filled with the color red. In the code it assumes that the image starts out as red... the important part is the replaceColor() method of the inner ColorCanvas class. That grabs the pixels, swaps the colors, and rebuilds the image.
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.