提供对位图进行颜色处理的辅助类
More...
#include <SDIBHelper.h>
提供对位图进行颜色处理的辅助类
简洁版本,简版去掉了对8、16、24位的支持
Definition at line 13 of file SDIBHelper.h.
◆ CalcAvarageColor()
COLORREF SDIBHelper::CalcAvarageColor |
( |
IBitmapS * | pBmp, |
|
|
int | nPercent = 90, |
|
|
int | nBlockSize = 5 ) |
|
static |
计算图片的平均颜色
- Parameters
-
pBmp | 图片源位图对象指针 |
nPercent | 有效值百分比,90代表最高和最低5的值会丢掉,不参与平均 |
nBlockSize | 分块大小,每次计算一个块的颜色平均值 |
- Returns
- 计算得到的平均颜色
Definition at line 333 of file SDIBHelper.cpp.
◆ Colorize() [1/2]
bool SDIBHelper::Colorize |
( |
COLORREF & | crTarget, |
|
|
COLORREF | crRef ) |
|
static |
对单个颜色进行着色处理
- Parameters
-
- Returns
- 成功返回TRUE,失败返回FALSE
Definition at line 266 of file SDIBHelper.cpp.
◆ Colorize() [2/2]
bool SDIBHelper::Colorize |
( |
IBitmapS * | pBmp, |
|
|
COLORREF | crRef ) |
|
static |
对位图进行着色处理
- Parameters
-
- Returns
- 成功返回TRUE,失败返回FALSE
Definition at line 246 of file SDIBHelper.cpp.
◆ GrayImage()
bool SDIBHelper::GrayImage |
( |
IBitmapS * | pBmp | ) |
|
|
static |
将位图转换为灰度图像
- Parameters
-
- Returns
- 成功返回TRUE,失败返回FALSE
Definition at line 285 of file SDIBHelper.cpp.
The documentation for this class was generated from the following files: