Drawing images - Background and foreground color?
843807Dec 27 2008 — edited Dec 28 2008At the moment I'm using an image with only two colors in it, and taking parts of it to render to a BufferedImage (a buffer) and finally to thescreen. The background part is easy -- it's a part of the function itself. But I want to be able to change the other color. This image I'm drawing from is just a way to get where to put foreground and background color.
A couple of questions come from this:
1. Is drawing from this image a good idea, or would it be faster just to draw individual rectangles from an array?
2. Is there a "color transform" class I could use to change the image's color before I copy from it? Or some other way to say white=(whatever color) and black=(other color)
And one that is not entirely related, but would increase my program's efficiency a lot:
3. Can I put one pixel into a BufferedImage, instead of a 1x1 rectangle?
Thanks for any help you can provide. :D (Many stars will be given for answers....)