Fun question, I have an IMAGE (that I get from a bitmap file), it can be of pretty much anything (a character, an item, a weapon, a wall or floor, etc...) and depending on a value (level) I have to change its color.
For example let us use the WEAPON->BOMB picture - a simple bomp.bmp file with a white background and a black filled circle in the middle representing a bomb...
This is how I currently use it ...
What I want to do is change the COLOR of the bomb from BLACK to something else depending on the variable (level), so if level=0 then leave it as is, if level=1 then make the bomb BLUE, if level=2 make the bomb RED, etc...
Thing is I have no clue how to change the color of the picture (without affecting the actual original file itself)... I have no idea how to fill the bomb with a certain color?
Also, that is but the simplest example - I also have CHARACTERS (same idea) but for them I only want to change the color of the BODY, so same idea a level=0 gets the default body, a level=1 gets a BLUE body, etc...
And the only thing I want to change is the BODY of the character, not the hair, etc... How do you pinpoint that area only and change it from color X to color Y?
Any ideas, hints, and help would be greatly appreciated, thanks
For example let us use the WEAPON->BOMB picture - a simple bomp.bmp file with a white background and a black filled circle in the middle representing a bomb...
This is how I currently use it ...
Code:
Bitmap imgCell = (Bitmap)Image.FromFile("bomb.bmp");
imgCell.MakeTransparent();
What I want to do is change the COLOR of the bomb from BLACK to something else depending on the variable (level), so if level=0 then leave it as is, if level=1 then make the bomb BLUE, if level=2 make the bomb RED, etc...
Thing is I have no clue how to change the color of the picture (without affecting the actual original file itself)... I have no idea how to fill the bomb with a certain color?
Also, that is but the simplest example - I also have CHARACTERS (same idea) but for them I only want to change the color of the BODY, so same idea a level=0 gets the default body, a level=1 gets a BLUE body, etc...
And the only thing I want to change is the BODY of the character, not the hair, etc... How do you pinpoint that area only and change it from color X to color Y?
Any ideas, hints, and help would be greatly appreciated, thanks