Skip to content

shekky/n-metadata-extractor

 
 

Repository files navigation

NMetadataExtractor

Update June 25 2015 See the original author's fork instead! We're happy to see an official C# version kept in sync with the Java original.

master: Build status most recent commit: Build status Download documentation archive

C# port of the excellent Java MetadataExtractor library by Drew Noakes.

Automated conversion was performed with our enhanced version of Sharpen, custom configuration, and then a set of manual patches. MetadataExtractor 2.8.0 was converted.

Many thanks to Yakov Danilov yakodani@gmail.com his work in porting this library from Java to C#.

Also, special thanks to Ferret Renaud, who provided a C# port for many years. His code can be found in the 'renaud' branch.

All code herein is licensed under one of the following licenses: Apache 2, BSD, MIT. See LICENSE for details about which code is licensed under which license.

ICSharpCode.SharpZipLib is licensed under the GPL with a linking exception, so it can be used in commerical products.

To-do

  • Publish to NuGet
  • Add documentation (and where possible, re-use documentation from the original).

Example use

Autocoverted examples:

https://github.com/imazen/n-metadata-extractor/blob/master/Com.Drew/Com/drew/tools/ProcessAllImagesInFolderUtility.cs

https://github.com/imazen/n-metadata-extractor/blob/master/Com.Drew/Com/drew/tools/ProcessUrlUtility.cs

Sample project "SampleReader"

Basic usage


var meta = ImageMetadataReader.ReadMetadata(InputStream.Wrap(stream)); //Stream must be seekable

//Produce a list of strings containing metadata key/value pairs. 
var strings = metadata.GetDirectories().SelectMany(d => d.GetTags().Select(t => String.Format("[{0}] {1} = {2}\n",d.GetName(), t.GetTagName(), t.GetDescription()))).ToList();

Releases

No releases published

Packages

No packages published

Languages

  • C# 99.9%
  • Other 0.1%