24BMP256ColorGray
代码说明:
本代码实现的功能:24位位图(BMP)的灰度化。具体实现过程:打开图像文件,找到数据区(每3个字节代表一个象素的R,G,B值),循环扫描,根据RGB的权重,计算出灰度值. 如果要得到256色灰度图,则要新建一个调色板,修改信息头和文件头.(Realize the function of the code: 24-bit bitmap (BMP) of the gray. Concrete realization of the process: Open the image file, locate the data area (3 bytes per pixel on behalf of a R, G, B values), cyclic scan, according to the weight of RGB, gray value is calculated. If you want to get 256 colors grayscale, would create a new palette, modify the header and file header information.)
下载说明:请别用迅雷下载,失败请重下,重下不扣分!