Modifying the Image Palette
-
I have a Format8bppIndexed image . I tried to modify the palette using the below code. ColorPalette pal = bitmapImage.Palette; for (int i = 0; i < pal.Entries.Length/2; i++) pal.Entries[i] = Color.FromArgb(255, 255, 255); bitmapImage.Palette = pal; but the somehow this change in palette does not affect on the image when i save the Image using bitmapImage.Save("filepath"); How do I make the change in palette affect the image.
-
I have a Format8bppIndexed image . I tried to modify the palette using the below code. ColorPalette pal = bitmapImage.Palette; for (int i = 0; i < pal.Entries.Length/2; i++) pal.Entries[i] = Color.FromArgb(255, 255, 255); bitmapImage.Palette = pal; but the somehow this change in palette does not affect on the image when i save the Image using bitmapImage.Save("filepath"); How do I make the change in palette affect the image.
Hi, Not sure if this help you at all but it seems to have some working sample code and explanantion with it so have a look: http://www.charlespetzold.com/pwcs/PaletteChange.html[^] Hope this helps, Ed