I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2007-05-31 15:14:17-07 by themonk
Aliases .. some thoughts
Hi Phil...

Any thoughts on the best way of doing this...
This is not a request, just an insight into how people maybe using exiftool.

Aliases are useful for returning a group of values.....

However, another use of them is to check several equivalent locations for metadata.
You maybe looking for one value but it may be defined in several places...
Using the aliases you can define an order of precedence...
e.g Look in EXIF, then in XMP, then in PhotoShop for Resolution.

A problem is that the locations returned by aliases "may" not use any common string which enables us to associate
the value returned with the specified alias. As such we have to call exiftool several times, once for each alias, filter the results,
ignoring everything but the first returned value.
If we had a command line which used three aliases to return three possible values we will get a list of assorted locations/values returned
which then need to be parsed. We need to know what locations map to which aliases in the ExifTool_config to parse these values.
Only then can we match the values returned with the aliases....

There are two possible enhancements here...
1. Use aliases to return a single value from a list of possible locations
2. Be able to use multiple aliases in a single invocation and identify the values returned without
knowing the contents of ExifTool_config

Hope this makes some sort of sense....
Direct Responses: 5286 | Write a response
Posted on 2007-05-31 18:38:26-07 by exiftool in response to 5284
Re: Aliases .. some thoughts
Hi Mark,

I think I understand at least some of what you are suggesting:

1. Use aliases to return a single value from a list of possible locations

This is in fact a common purpose of the Composite tags. So adding a user-defined Composite tag can give you exactly this functionality.

2. Be able to use multiple aliases in a single invocation and identify the values returned without knowing the contents of ExifTool_config

I assume you mean from the command line (since doing this via the API is easy.) One way to do this is with something like this (using the -common and -canon aliases for example):

> exiftool -common -xxx -canon -f image.jpg ALIAS1: - FileName: a.jpg FileSize: 384 kB Model: Caplio 500SE DateTimeOriginal: 2007:05:23 14:30:09 ImageSize: 1280x960 Quality: - FocalLength: 5.8mm ShutterSpeed: 1/36 Aperture: 2.5 ISO: 248 WhiteBalance: Auto Flash: Off ALIAS2: - FileName: a.jpg Model: Caplio 500SE DateTimeOriginal: 2007:05:23 14:30:09 ShootingMode: - ShutterSpeed: 1/36 Aperture: 2.5 MeteringMode: Multi-segment ExposureCompensation: 0 ISO: 248 Lens: - FocalLength: 5.8mm ImageSize: 1280x960 Quality: - FlashOn: - FlashType: - ConditionalFEC: - RedEyeReduction: - ShutterCurtainHack: - WhiteBalance: Auto FocusMode: - Contrast: - Sharpness: Normal Saturation: High ColorTone: - FileSize: 384 kB FileNumber: - DriveMode: - OwnerName: - SerialNumber: -

Here you can see which tags belong to which aliases because I have asked for the non-existent ALIAS1 and ALIAS2 tags. With the -f option, all requested tags are returned, and missing values are indicated by "-".

Does this do what you wanted?

- Phil
Direct Responses: 5288 | 5291 | Write a response
Posted on 2007-05-31 18:42:33-07 by exiftool in response to 5286
Re: Aliases .. some thoughts
Oops, sorry. For the last example I changed my command line but it got left out when I cut and re-pasted. Here is the correct command:

exiftool -ALIAS1 -common -ALIAS2 -canon -f -S a.jpg

- Phil
Direct Responses: Write a response
Posted on 2007-06-01 10:43:04-07 by themonk in response to 5286
Re: Aliases .. some thoughts
Phil

Wow .... Composite Tags combined with 'Desire' or 'Require' !!!!!

This is the perfect solution to everything

1. I can create a composite tag using 'Desire' which looks in all the required locations
I can then use ValueConv to return the first one that is defined
As such, only one value is returned........
2. The name that is returned by Composite Tags is the name of the Composite Tag and not the name of the 'Desire' tags so I now can combine composite tags in one command call and parse
the results easily.

This is fantastic stuff..

Mark
Direct Responses: Write a response