简体   繁体   中英

Cannot get Metadata Extractor to run

This is probably an embarrassing question (sorry!): I just installed Metadata Extractor via NuGet without any problem. However, in

    using MetadataExtractor;    

     ...

    Metadata metadata = ImageMetadataReader.readMetadata(file); 

VisualStudio (2015) tells me that the type or namespace for Metadata cannot be found and that ImageMetadataReader does not contain a definition for readMetadata. Thought these were all defined within the Metadata Extractor class. What am I missing?

It looks like you based your code on the Java sample on the website. Check out the C# one instead.

Function names are case sensitive. readMetadata does not exist.

Carefully check the return value of ImageMetadataReader.ReadMetadata() and I think you will see the issue. If you mouse over it in Visual Studio, it should show you that it returns an IReadOnlyList<MetadataExtractor.Directory> object.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM