• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Finally, you can manage your Google Docs, uploads, and email attachments (plus Dropbox and Slack files) in one convenient place. Claim a free account, and in less than 2 minutes, Dokkio (from the makers of PBworks) can automatically organize your content for you.



Page history last edited by Paul G. Taylor 12 years, 4 months ago

And now I have something more to add - couldn't decide where to put it and found this old thread - so here it is : --




Here is a veritable gold-mine of information sitting right here on my computer, just waiting for me to dig and explore!


What has that got to do with this thread, you ask?


Well, looking through just one of the vast number of how-tos that seems to be there, I discovered one that lead me to



This is a linked, fully-featured tutorial on how to script to do routine maintenance, etc, on a Linux machine. It looks really fascinating and could lead to just about anywhere ...


But, that isn't the one I started to mention, it was an application which will inject information into the exif-part of a JPEG file and now I can't find the link or anything about it, not even a trace of how I stumbled upon it! So this is a post masquerading as information but hiding it away in the recesses of my mind where I am unable to retrieve it!



Fri, 26 Sep 2008


Ah, found it! [from four days ago, so no wonder I had a hard job finding it again]


How to add metadata to digital pictures from the command line

By Marco Fioretti on September 19, 2008 (7:00:00 PM)


There is an extensive help file embedded in the application, which, incedently, is already installed on my Klikit-Linux 0.1-8(Beta) system.


Digital media files are more useful and accessible when tagged with metadata -- that is, descriptive information about each photo that either can be embedded inside images themselves or stored in external databases. ExifTool is an efficient, flexible, and portable way to manage image, audio, and video metadata under Linux. In this article we'll see how to use ExifTool to manage EXIF data inside JPEG files.


Due to its architecture, ExifTool is very flexible. It comprises a multiplatform bundle of some Perl modules for EXIF processing plus a small program called exiftool to use them from the command line. The utility can read and write data and pictures from pipes or (remote) files without any problem. So, for instance, to save a local, commented copy of a JPEG picture you found online, you can use a command like wget -qO - http://some.website.com/picture.jpg | exiftool -Comment="African Sunset" > localcopy.jpg.


The basic syntax to add or modify EXIF tags is simple. You just need to type exiftool and then the name (prepended by a dash) and value of each EXIF tag to write. By default a separate copy of the original file is saved with the "_original" suffix. Several options allow recursive operations inside directory trees.


If you have one JPEG file that already contains all the EXIF metadata you need, you don't have to type it again to add it to other pictures. The -TagsFromFile option copies all tags from the file specified right after it to the one given as final argument: exiftool -TagsFromFile tagged_picture.jpg untagged_picture.jpg.



The -w option instead writes all the EXIF tags found inside a picture into a text file, or, if you add -htmlDump, an HTML file. If you want to export all the metadata to a relational database, a better way is to use a command like exiftool -t -S PICTURE_DIR | grep -v ^==== > picture_tags_values.txt, which writes to picture_tags_values.txt all the EXIF tags of all the pictures inside PICTURES_DIR, separated by tabs, one picture per line. Such a format can be immediately loaded in a MySQL database with the LOAD DATA INFILE, FIELDS TERMINATED BY, and LINES TERMINATED BY options. A thread at Perl Monks contains a full example of importing tab-delimited data into MySQL in this way.



One of the most interesting and powerful features of ExifTool is its ability to use intelligent, conditional tagging by means of the -if option. For instance, with a command like exiftool -alldates+=1 -if '$CreateDate ge "2006:04:02"' MY_PICTURE_FOLDER, you can add one hour to all the images in MY_PICTURE_FOLDER that were created on or after April 2, 2006, and only to those images. The -alldates option is an ExifTool alias for all the timestamps you may find into a JPEG file: DateTimeOriginal, CreateDate, and ModifyDate. You can read about these and all the other command options in ExifTool's great man page.






Comments (0)

You don't have permission to comment on this page.