将bmp转换为256色
问题描述:
Convert bmp to 256 colors
(图像)将24位转换为256色,而不是灰度。
谢谢。
(images) Convert 24 bit to 256 colors, not grayscale .
thanks.
答
我认为最好的方法就是将图像转换为带调色板的图像。这当然意味着将位从24位更改为1-8位。
我相信互联网上有一些关于如何执行此操作的链接。我做了一个快速搜索,发现了以下内容:
MSDN转换图像
C#RGB到基于调色板的8位灰度位图类
转换24位图像
我还发现了以下演示版本,可让您转换位图像保持图像颜色:
Silverlight图像处理
希望这有帮助
I think the best way to do what you want is by converting the image to an image with palette. This of course means changing the bits from 24 to 1-8 bits.
I believe there are some links on the internet on how to do this. I did a quick search and found the following:
MSDN convert image
C# RGB to Palette Based 8-bit Greyscale Bitmap Class
Converting 24 bit image
I also found the following demo that lets you convert the bits of the image while keeping the image colored:
Silverlight image processing
Hope this helps
位图的快速颜色深度变化 [ ^ ]