Page 1 of 1

Reading file attributes quickly

Posted: 2017-12-15T11:46:50-07:00
by kzlife76
I'm using the .Net library to develop an application that can read the attributes of CR2 (Canon EOS Raw) files and move them to another directory based on their attributes. I have successfully got this working however, it is really slow.

when I call new MagickImageInfo(path), it takes a good 1-2 seconds to open the file. I assume that this is actually loading the entire file to memory. I looked at using MagickImageInfo, but it does not provide the property that I am looking for.

I want to get the Date Taken value out of the file. Is there a more efficient way of doing this?

Thanks!

Re: Reading file attributes quickly

Posted: 2017-12-15T11:53:51-07:00
by snibgo
Perhaps exiftool does what you need.

Re: Reading file attributes quickly

Posted: 2017-12-15T18:41:07-07:00
by kzlife76
I found a library that is better suited for what I'm looking for. I can process the metadata of each file in about 1 second.

http://nugetmusthaves.com/Package/MetadataExtractor

ImageMagick is still quiet a powerful tool. Unfortunately, it's not built to do what I want it to do and I don't want to shoe horn it. I will keep it in mind if I have any need for photo manipulation though.

Re: Reading file attributes quickly

Posted: 2017-12-15T19:01:41-07:00
by snibgo
IM has a "ping" facility that generally reads metadata without reading pixels. But IM is fundamentally a raster image processor, not a metadata processor.