[How to] Read date taken from MagickImage object?

Aug 26, 2014 at 1:06 PM
Hi,
in InfranView when I view an image I can see "File date/time" like image below

Image

I try to read this date taken value from MagickImage object but I don't know where to find this property.

Can you give me a hint?

A sample image can be downloaded from this link https://www.mediafire.com/?88xfbtnt5z1pb0n
Coordinator
Aug 26, 2014 at 2:41 PM
You should read that information using the FileInfo class of C#. This is not something that only works with images.

p.s. If you are trying to build something like IrfanView, then take a look at MagickViewer (https://magickviewer.codeplex.com).
Sep 8, 2014 at 1:57 PM
Hi dlemstra,
thank you for your answer. I think this DateTime can be read also from MagickImage object then I can save some rows of code. :)

I'm trying to make some examples with Magick.Net for reading and writing EXIF data. Hope you'll make some examples to illustrate these points if you have time. I think other developers are interested in too.
Coordinator
Sep 8, 2014 at 2:10 PM
Edited Sep 8, 2014 at 2:10 PM
I won't add a DateTime property because an image can also be read from a stream. You can find some example about reading exif data here: https://magick.codeplex.com/wikipage?title=Exif%20data&referringTitle=Documentation. I will also add a write example.