Duplicate tags (Nikon:FlashExposureComp) return different values

Started by alyda, June 24, 2010, 03:07:55 PM

Previous topic - Next topic

alyda

Well, you've got me slapping my forehead on that one. I forgot that Perl variables are passed by reference by default. Introduces a new old problem however. The $exifTool->Options('DateFormat' => '%Y%m%d-%H%M%S'); statement no longer formats the date for my filename.

Phil Harvey

I'm sorry.  I wasn't thinking about your entire script.  You use the shifted date/time value in your file name?  This adds complexity because the shift must be applied to the unformatted (ValueConv) value, then you must do the DateFormat conversion yourself:


$exifdto = $exifTool->GetValue('DateTimeOriginal', 'ValueConv');
require 'Image/ExifTool/Shift.pl';
Image::ExifTool::ShiftTime($exifdto, '10:00', -1);

$exifTool->Options('DateFormat' => '%Y%m%d-%H%M%S');
$exifdto = $exifTool->ConvertDateTime($exifdto);


You're being very patient here.  This is fairly involved because we're taking advantage of some private ExifTool functions to ease the programming load for you.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

alyda

Yes! It even works when I substitute my $tz variable for '10:00.'

Quote from: Phil Harvey on July 05, 2010, 03:30:13 PM
You're being very patient here.

You're the patient one. Thank you so very much for all your help. If you do make it down to Maui, the drinks are on me. I promise I won't attempt a mind-meld unless you're very drunk.

---
Alyda

Phil Harvey

Quote from: alyda on July 05, 2010, 03:48:52 PM
Thank you so very much for all your help.

You're welcome.

Quote
If you do make it down to Maui, the drinks are on me. I promise I won't attempt a mind-meld unless you're very drunk.

LOL. With free drinks, there is little chance that I would remain sober... :P

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).