• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: exiftools
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: exiftools


  • Subject: Re: exiftools
  • From: Roger Howard <email@hidden>
  • Date: Wed, 29 Feb 2012 19:29:37 -0800

On Feb 29, 2012, at 11:14 AM, Eric Saunders wrote:

> Hello list,
>
> I am struggling to understand how to add custom tags to the config file for exiftools. I am an applescript only guy, so I dont understand the structure of the file. If it would be possible, would someone post an example of what a config file would look like to add the tag "Example" that takes a string or text as a value? I would truly appreciate it.

Sure thing.

First things first - or rather let's start from the end... *where* do you want this tag stored? Is it meant to be stored in XMP? Or a custom IPTC tag? Custom PNG tag? This isn't so much an exiftool question as a general one - where do you want this data stored? In what types of files?

If you don't have a specific answer, the best answer is probably "XMP" - that has the broadest number of file formats supported, and the most flexibility. If you go with XMP, you need to further figure out a few things - first, and foremost, what XMP namespace do you want this tag to be in? An existing namespace (in which case you may be breaking a convention by adding your own tag into someone else's space - but on the otherhand, is a lot easier as you won't have to define the namespace too), or a custom namespace?

Second, what type of field? Just a simple, single text value? XMP provides a lot of awesomeness like translation support, multivalue fields (bags), etc.

Ok, all that out of the way - have you looked at:

http://owl.phy.queensu.ca/~phil/exiftool/config.html

That's a pretty exhaustive sample of just about everything you could do with a custom tag configuration file... yours will be much, much smaller, and simpler, as this shows pretty mcuh everything possible.

I'm not a Perl guy myself, but it's still pretty straightforward - the complicate stuff isn't because it's Perl, it's because embedded metadata is complicated - believe me when I say exiftool makes this about as easy as it could be without dumbing it down.

In essence, you're going to create a stripped down version of that file; then store it in your home directory (~) as ".ExifTool_config", or simply load it when you run exiftool using the -config option.

Ok, all that said, here's the simple example I can come up with:

#------------------------------------------------------------------------------
%Image::ExifTool::UserDefined = (
    'Image::ExifTool::XMP::xmp' => {
       CustomFieldName => { },
    }
);
#------------------------------------------------------------------------------



Copy that into a text file, save it somewhere, and then use it like so:

exiftool -config /path/to/config/file.txt -CustomFieldName='Some custom value here' /path/to/image/file.jpg

Obviously, replacing the paths as appropriate.

When complete, check the file to see it was added:

exiftool -s -s -G /path/to/image/file.jpg

You should see an entry like:

[XMP] CustomFieldName: Some custom value here

Pop it open in Photoshop, open File Info, and it should be visible under XMP Basic Properties in the Advanced tab.

Hope this helps!
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


References: 
 >exiftools (From: Eric Saunders <email@hidden>)

  • Prev by Date: Re: Opening Folders in Lion
  • Previous by thread: exiftools
  • Next by thread: Opening Folders in Lion
  • Index(es):
    • Date
    • Thread