Setting the Color Pallette in an Indexed bitmap

  • Thread starter Thread starter James Dean
  • Start date Start date
J

James Dean

I want to put my own custom colors in the Pallete.....could someone tell
me how to do this?. I tried the following:
bitmap.Palette.Entries.SetValue(Color.White,0);
This was supposed to set the color in the first position in the pallette
but it doesn't......how do i do this?.
 
Check out the article in the GDI+ FAQ that explains how to modify the
transparent colour in a GIF image. The technique used to replace the colour
palette in that article can be used on any indexed image format.

--
Bob Powell [MVP]
Visual C#, System.Drawing

The Image Transition Library wraps up and LED style instrumentation is
available in the June of Well Formed for C# or VB programmers
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

The GDI+ FAQ RSS feed: http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tipstricks.xml
Bob's Blog: http://bobpowelldotnet.blogspot.com/atom.xml
 
Back
Top