Search code examples
.netgdi+exifimaging

Image Property Tag Constant


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.