Reading data metadata from JPEG, XMP or EXIF in C#

前端 未结 5 2012
悲&欢浪女
悲&欢浪女 2020-12-14 18:56

I\'ve been looking around for a decent way of reading metadata (specifically, the date taken) from JPEG files in C#, and am coming up a little short. Existing information, a

5条回答
  •  渐次进展
    2020-12-14 19:50

    My company makes a .NET toolkit that includes XMP and EXIF parsers.

    The typical process is something like this:

    XmpParser parser = new XmpParser();
    System.Xml.XmlDocument xml = (System.Xml.XmlDocument)parser.ParseFromImage(stream, frameIndex);
    

    for EXIF you would do this:

    ExitParser parser = new ExifParser();
    ExifCollection exif = parser.ParseFromImage(stream, frameIndex);
    

    obviously, frameIndex would be 0 for JPEG.

提交回复
热议问题