Reading file attributes quickly

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
kzlife76
Posts: 2
Joined: 2017-12-15T11:40:47-07:00
Authentication code: 1152

Reading file attributes quickly

Post by kzlife76 » 2017-12-15T11:46:50-07:00

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!

snibgo
Posts: 10554
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Reading file attributes quickly

Post by snibgo » 2017-12-15T11:53:51-07:00

Perhaps exiftool does what you need.
snibgo's IM pages: im.snibgo.com

kzlife76
Posts: 2
Joined: 2017-12-15T11:40:47-07:00
Authentication code: 1152

Re: Reading file attributes quickly

Post by kzlife76 » 2017-12-15T18:41:07-07:00

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.

snibgo
Posts: 10554
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Reading file attributes quickly

Post by snibgo » 2017-12-15T19:01:41-07:00

IM has a "ping" facility that generally reads metadata without reading pixels. But IM is fundamentally a raster image processor, not a metadata processor.
snibgo's IM pages: im.snibgo.com

Post Reply