Changing System.Drawing.Bitmap.Palette

1.9k views Asked by At

I have a TIFF file in memory, which I obtained by a variant of the following code:

Image myImage = Image.FromFile("somefile.tiff");

Currently, myImage.Palette only returns two colors, black and white. I would like to expand this to include the entire color spectrum. However, myImage.Palette does not have a function to add additional colors.

Can someone help give my TIFFs some color? Thanks.

1

There are 1 answers

0
Shay Erlichmen On BEST ANSWER

You can try to use the Clone method to clone the bitmap to Format8bppIndexed