I have written an app that reads the basic EXIF data from an image via the PropertyItems exposed in .Net's System.Drawing.Image class. However, I cannot retrieve Canon specific EXIF data via these properties. How does one read this information? I know it exists in the file, as Photoshop reads it.
I found this a while ago but haven't used it yet. It looked like it had manufacturer specific info.
http://renaud91.free.fr/MetaDataExtractor/
UPDATE:
The metadata-extractor project has been alive and well since 2002 for Java, and is now available for .NET. It has comprehensive support for Canon's makernotes as well as those from Agfa, Casio, Epson, Fujifilm, Kodak, Kyocera, Leica, Minolta, Nikon, Olympus, Panasonic, Pentax, Sanyo, Sigma/Foveon and Sony cameras and scanners.
You can browse example output for several Canon (and other) camera images here.
The library is available via NuGet or GitHub.
Sample usage:
IEnumerable<Directory> directories = ImageMetadataReader.ReadMetadata(path);
foreach (var directory in directories)
foreach (var tag in directory.Tags)
{
Console.Out.WriteLine($"{directory.Name} - {tag.TagName} = {tag.Description}");
}
see an updated answer here: C# Retrieve Canon Specific EXIF Data
If you're compiling against v3 of the Framework (or later), then you can load the images using the BitmapSource
class, which exposes the EXIF metadata through the Metadata
property. This gives a much closer connection to the EXIF information in the pictures, although the maker notes are specific and will need further decoding.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With