I am writing a C# shell application that uses ImageMagick. I want to get the EXIF DateTimeOriginal field, so that I can parse and reformat the date and time to timestamp a JPEG. What’s the best way to do that?
Some additional information: I am using the .NET Process class to drive ImageMagick, and I can redirect ImageMagick’s output using the output stream of the Process class. What I can’t figure out is how to invoke ImageMagick to return the DateTimeOriginal data.
Thanks in advance for your help.
It should be possible to read that kind Exif data using the objects from the .NET Framework, most notable using the
Imageclass and theTryGetPropertyItemmethod.This way you do not need to spawn a new process.