Batch embedding metadata into JPGs with a csv file

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
William
Posts: 1
Joined: 2015-03-13T09:51:49-07:00
Authentication code: 6789

Batch embedding metadata into JPGs with a csv file

Post by William »

Hello,

I work at a company that provides digital archival services. We normally use ExifTool to batch transfer meta data from a .csv file into multiple JPGs at once. Recently, however, one of our clients said that the metadata we embedded with ExifTool did not work with there database, and they suggested we use ImageMagick instead.

I use a Windows operating system. What I need to do is batch transfer meta data from a csv file into a set of JPGs. The csv spread sheet would contain all the file names under "SourceFile", and corresponding fields "DateCreated", "Keywords", "Description", and "Writer-Editor". With ExifTool, I do it like this: I put all the JPGs in a folder with ExifTool.exe and the corresponding csv. Then, from the command prompt, in the correct directory, I type:

exiftool.exe -csv="name of csv file" .

and all the metadata from the csv file is embedded into the appropriate fields in the JPGs. I also need to be able to extract meta data from a JPG file to see which fields are populated. With ExifTool I type:

exiftool.exe -s "name of image file'

and it shows me all the metadata fields and the information they are populated with.

So my question is, can I do the same thing, or a similar thing with ImageMagick?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Batch embedding metadata into JPGs with a csv file

Post by snibgo »

ImageMagick is primarily a processor of images. It deals with metadata, but only as needed to interpret pixel data.

You can extract exif metadata using IM. For example:

Code: Select all

convert \pictures\20130713\aga_1434.jpg -format "%[EXIF:Model]" info:

NIKON D800
Use "*" insead of "Model" to get all fields. See http://www.imagemagick.org/script/escape.php

However, I don't think IM has a mechanism for writing general exif fields. Exiftool does, and is the usual tool for this.

I don't know what your client meant by "the metadata we embedded with ExifTool did not work with there database", nor why the tool that embeds the data would make any difference.
snibgo's IM pages: im.snibgo.com
Post Reply