david

david

  • NA
  • 2
  • 0

Gif Transparency?

Jan 7 2007 8:55 AM
Hi folks.

Im pretty new to c sharp and am working through some material with a view to creating a couple of small games to be deployed to a windows mobile device. I was wondering if anyone could point me in the right direction for showing a gif image with its transparency intact?

As a really simple example i have the following code:

Graphics dc = this.CreateGraphics();

this.Show();
Image piccy = Image.FromFile(@"C:\csharp\Tile.gif");
dc.DrawImage(piccy, x, y);

the file is a simple 8 bit gif with a white background set as transparent when it was created, but i am unable to find any interface for c# to display the transparency. Could someone please advise me on the code req'd, or even where to look for this info? Thanks in advance for any help or advice.

Dave