Image Property Tag Constant
Question
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.
Solution
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.
OTHER TIPS
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.
You're looking for the System.Drawing.Imaging.PropertyItem
class. See a description and an example on MSDN