0

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....

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by Pikachumanson
0

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..

0

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.MakeTransparent();
                HeroImage = new Bitmap("Hero.bmp");

            }

Edited by Reverend Jim: Fixed formatting

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.