在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.