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 2008-11-09 13:44:15-08 by bogdan
Using TagsFromFile AND
Hi Phil,

Again, I've tried various options (and combinations of those)... and ended here. Ok, what I'm trying to do, is something like this:
exiftool -TagsFromFile %f.CR2 -IFD0:Orientation -ext JPG dir
-this works, where all JPG files are modified.

I would like, only those JPG files will be modified, where Orientation tag in corresponding CR2 file (that is, in source file), contains either 6 or 8 (Rotate 90CW or Rotate 270CW). So, something like:
exiftool -TagsFromFile -if "($source:Orientation=6) or ($source:Orientation=8)" %f.CR2 -IFD0:Orientation -ext JPG dir
or (if that's faster for exiftool):
exiftool -TagsFromFile if "not ($source:Orientation=1)" %f.CR2 ...
-meaning, JPG will be updated only if source file is not horizontal.

As far I've tried, "if" statement always check tag value inside JPG (destination) file, and tag is copied based on conditional result inside destination file.
I hope, I made myself clear so far...

Now... if there's solution for my problem above, how about something like this (descriptive version):
-TagsFromFile %f.CR2 -if "$source:Orientation=6, then $dest:Orientation=8" -if "$source:Orientation=8, then $dest:Orientation=6" -ext JPG dir
-in my case, this would reduce file access (thus, increase speed -I believe).

Many thanks,
Bogdan
Direct Responses: Write a response