java 调节color亮度算法_调整图像亮度brightness,对比度contrast,饱和度saturation方法整理 | 学步园...

// initializes a direct draw struct

#define DDRAW_INIT_STRUCT(ddstruct) { memset(&ddstruct,0,sizeof(ddstruct)); ddstruct.dwSize=sizeof(ddstruct); }

// create IDirectDraw interface 7.0 object and test for error

if (FAILED(DirectDrawCreateEx(NULL, (void **)&lpdd, IID_IDirectDraw7, NULL)))

return(0);

DDCAPS hel_caps, hal_caps;

// initialize the structures

DDRAW_INIT_STRUCT(hel_caps);

DDRAW_INIT_STRUCT(hal_caps);

if (FAILED(lpdd->GetCaps(&hal_caps, &hel_caps)))

return(0);

if (hal_caps.dwCaps2 & DDCAPS2_COLORCONTROLPRIMARY)

OutputDebugString(_T("Supports primary surface contains color controls\n"));

if (hal_caps.dwCaps2 & DDCAPS2_COLORCONTROLOVERLAY)

OutputDebugString(_T("Supports overlay surface contains color controls\n"));

if (hal_caps.dwCaps2 & DDCAPS2_PRIMARYGAMMA)

OutputDebugString(_T("Supports loadable gamma ramps for the primary surface\n"));

同样的,你需要对DirectDraw有必要的了解,如果是使用GDI来负责图像的绘制,那么DirectX和DirectDraw的方案并不适合。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值