I have a hero sprite which I have implemented in in my game. He walks around in a grass field. Unfortunately, he is surrounded by a white border that is also in the btmap(or JPG in this case). Any idea on how I can get my program to differentiate the white color(Make it disapper so I just see grass where the white used to be) from my character sprites colors? I'm using Visual Studio 2008 C# with Directx 9 and have no interest in using XNA for this project. Any tips or suggestions will be greatly appreciated.

I will post code if there is a need for it but I think this problem can be solved with out... I just happened not to have the solution....

if the white border is in the graphic, first thing Id say would be remove it from the graphic, if its not, you could consider programattically making the picture smaller..

Thanks for the advice but I already tried that. I did manage to solve the problem by making use of the MakeTransparent(); method. YAY!!!

It works something like this:

if (HeroImage == null)

                HeroImage = new Bitmap("Hero.bmp");