colortrans.h
上传用户:smdfuse
上传日期:2015-11-06
资源大小:98k
文件大小:1k
- #pragma once
- class ColorTrans
- {
- public:
- ColorTrans(void);
- public:
- ~ColorTrans(void);
- public:
- //彩色转换为灰度图象,输出为8位灰度,输入为24位RGB
- bool RGB2Gray8(unsigned char* rgb, unsigned char* gray, int width, int height);
- //8位 灰度 -> 24位
- unsigned char* gray2RGB2(unsigned char* gray, unsigned char* rgb, int width, int height);
- //灰度 24位 -> 8位灰度
- unsigned char* RGB2Gray(unsigned char* gray, unsigned char* rgb, int width, int height);
- //24位RGB -> 灰度(保持24位)
- //void RGBToGray(unsigned char* dib, int width, int height);
- };