首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 本代码实现的功能:24位位图(BMP)的灰度化。具体实现过程:打开图像文件,找到数据区(每3个字节代表一个象素的R,G,B值),循环扫描,根据RGB的权重,计算...

本代码实现的功能:24位位图(BMP)的灰度化。具体实现过程:打开图像文件,找到数据区(每3个字节代表一个象素的R,G,B值),循环扫描,根据RGB的权重,计算...

资 源 简 介

本代码实现的功能: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.

文 件 列 表

24BMP256ColorGray.txt
VIP VIP
0.170037s