PDA

View Full Version : Recolor imported images


ShaneC
03-22-2009, 02:52 AM
Heya,

I'm currently working on an RPG-style game whereby the player uses a menu system to interact with the environment.

I have created an image-based font (so that I am not bound by the default Windows fonts) and would like to be able to have it multiple colors.

Each image is imported as such:
ImageDatabase[i] = getImage(getCodeBase(),"images/rfont" + Integer.toString(i) + ".png");
(Where public static Image[] ImageDatabase;)

I would like to know if there is a way to allow for me to recolor the imported images. (They are all a solid white.) I'm almost certain it could be done but I'm not quite sure how to approach it. I have tried XOR Mode, which has the ability to do what I want with it, but when the rendered images overlap, they become inverted (i.e. XOR) which is very undesirable.

Any suggestions?