开发者

Changing System.Drawing.Bitmap.Palette

开发者 https://www.devze.com 2022-12-08 03:06 出处:网络
I have a TIFF file in memory, which I obtained by a variant of the following code: Image myImage = Image.FromFile(\"somefile.tiff\");

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 addition开发者_开发问答al colors.

Can someone help give my TIFFs some color? Thanks.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消