图像属性标记常量
我想使用图像属性标记常量 在 .NET 的 GDI+ 中定义。
我想知道这些常量值(例如 PropertyTagGpsVer 常量)是否在任何基类库中公开?
我尝试查看 System.Drawing.Imaging 命名空间,但无济于事。
I'd like to use the image property tag constants defined in GDI+ from .NET.
I wonder whether these constant values (e.g. PropertyTagGpsVer constant) are exposed in any of the Base Class Library?
I have tried looking around System.Drawing.Imaging namespace to no avail.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不,他们不是。
标签枚举: http://msdn.microsoft.com /en-us/library/ms534417(VS.85).aspx
标签的详细说明:http://msdn.microsoft。 com/en-us/library/ms534416(VS.85).aspx
我最终将这两页的大部分复制并粘贴到代码中,以便执行您想要的操作:拥有一组常量。 您需要按名称实现一组 PropertyItem,并使用 PropertyItem 的 id、长度和类型预先填充它们。
另一种方法不仅仅是选择您需要的常量并实现它们。
No, they are not.
Enumeration of the tags: http://msdn.microsoft.com/en-us/library/ms534417(VS.85).aspx
Long description of the tags: http://msdn.microsoft.com/en-us/library/ms534416(VS.85).aspx
I ended up copying and pasting most of these two pages into code in order to do what you want: have a set of constants. You'll need to implement a set of PropertyItems by name and pre-populate them with the id, length, and type of the PropertyItem.
The other way to do it is t just choose the constants you need and implement them.
如果您有 Microsoft SDK,则可以在名为 GdiPlusImaging.h 的 C 头文件中找到所有常量。
将头文件包含在 C 项目中非常简单,但您必须进行一些调整才能将它们全部放入枚举。
If you have the Microsoft SDKs, you can find all the constants in a C header file named GdiPlusImaging.h
It would be simple enough to include the header in a C project, but you'd have to do some tweaking to put them all into enumerations.
您正在寻找
System.Drawing.Imaging.PropertyItem
类。 请参阅 MSDN 上的说明和示例You're looking for the
System.Drawing.Imaging.PropertyItem
class. See a description and an example on MSDN