在Gdiplus C ++中使用BrightnessContrast类 [英] Use BrightnessContrast class in Gdiplus C++

查看:76
本文介绍了在Gdiplus C ++中使用BrightnessContrast类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当前在C ++应用程序中使用Graphics,Image,Color和Bitmap Gdi +类,但是每当我尝试使用 BrightnessContrastParams 我遇到错误:

I am currently using Graphics, Image, Color, and Bitmap Gdi+ classes in my C++ Application, but whenever I try to use BrightnessContrast and BrightnessContrastParams I get errors:

在Intellisense中:错误:命名空间'Gdiplus'没有成员'BrightnessContrast'

In Intellisense: Error: Namespace 'Gdiplus' has no member 'BrightnessContrast'

编译时:'BrightnessContrast':不是'Gdiplus'的成员

When Compiling: 'BrightnessContrast' : is not a member of 'Gdiplus'

有什么作用?我确实找到了论坛帖子表示要在项目属性中的其他清单依赖项:"中添加一行,我这样做是可行的,但仍然行不通.帖子继续说,尝试在%windir%\ winsxs中查找是否无效,但我看不出如何理解该目录中的文件.我正在Windows7 64bit上使用VisualStudio 2010.

What gives? I did find a forum post that said to add a line to "Additional Manifest Dependencies:" in the project properties, I did this but it still didn't work. The post goes on to say try looking in %windir%\winsxs if that doesn't work but I don't see how to make sense of the files in that directory. I am using VisualStudio 2010 on Windows7 64bit.

此外,我知道我可以创建自己的亮度和对比度功能.我想知道为什么我不能使用MSDN上记录的内置类.

Also, I am aware that I can create my own Brightness and Contrast functions. I am wondering why I can't use the build-in Classes that are documented on MSDN.

谢谢

推荐答案

这些成员仅在GDI +版本1.10(Vista最早提供的版本)中可用.您必须明确选择使用它们.像这样:

These members are only available in GDI+ version 1.10, the version that shipped first with Vista. You have to explicitly opt-in to use them. Like this:

#define GDIPVER 0x110
#include <gdiplus.h>

当执行此操作时,请注意您的程序将无法在XP上运行.

Beware that your program won't run on XP when you do this.

这篇关于在Gdiplus C ++中使用BrightnessContrast类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆