ExifTool Forum

ExifTool => Newbies => Topic started by: cali92rs on April 18, 2012, 02:29:01 PM

Title: .ExifTool_config for Dummies
Post by: cali92rs on April 18, 2012, 02:29:01 PM
OK, I am officially a dummy, lol.

I am trying to understand how the ExifTool_config file works in order to create a composite tag, but I am not getting past first base.

1)  Is ExifTool_config an actual file that has been created, or do we create it ourself?
2)  Is the ExifTool_config this entire document?  https://exiftool.org/config.html

Thanks in advance.
Title: Re: .ExifTool_config for Dummies
Post by: Phil Harvey on April 18, 2012, 02:34:56 PM
1) You create the config file yourself.  It is a plain text file. 

2) The entire document is the config file.  You can search the forum (https://exiftool.org/forum/index.php?action=search2&search=code+userdefined) for more examples.  Here is a simple one (https://exiftool.org/forum/index.php/topic,3978.msg18601.html#msg18601).

- Phil
Title: Re: .ExifTool_config for Dummies
Post by: cali92rs on April 19, 2012, 03:00:09 AM
 I am having a problem with getting the exiftool and config file in the same location.  Exiftool downloaded into /usr/bin.  When I try to rename the file to .ExifTool_config in /usr/bin,  I get an error stating that I don't have permission.   
Can I change where exiftool is downloaded for easier access,  or am I looking at it wrong?
Title: Re: .ExifTool_config for Dummies
Post by: Phil Harvey on April 19, 2012, 07:17:40 AM
typically, the config file should go in your home directory.  On Mac/Linux you do it like this:

mv your_config_file.txt ~/.ExifTool_config

- Phil
Title: Re: .ExifTool_config for Dummies
Post by: cali92rs on April 19, 2012, 08:37:29 PM
Phil, thanks so much, you have the patience of a saint!
:)
Title: Re: .ExifTool_config for Dummies
Post by: cali92rs on April 19, 2012, 11:23:06 PM
So I was finally able to get the sample .ExifTool_config file to work.
The whole reason for this is so I can get LR3 to correct for my Sigma 8-16mm, per these instruction by Beholder3:
http://www.pentaxforums.com/forums/post-processing-articles/176330-sigma-8-16-mm-lens-correction-metadata-ps-lr-especially-8-mm.html

The .ExifTool_config file I created was:

%Image::ExifTool::UserDefined = (
'Image::ExifTool::Composite' => {
Calc35mm => {
Require => 'copy2:FocalLength',
ValueConv => '$val * 1.5'},
},
);


Then I ran this command:

exiftool -exif:FocalLength<copy2:FocalLength MYIMAGEFILE


However, when i run that, I get this:
-bash: copy2:FocalLength: No such file or directory

What do I need to modify in the above code to get the 8mm in the focal length of my image's exif ?

Thanks again!


Title: Re: .ExifTool_config for Dummies
Post by: Phil Harvey on April 20, 2012, 07:31:54 AM
I think the command you wanted was this:

exiftool "-exif:focallength<calc35mm" MYIMAGEFILE

You forgot the quotes, and you didn't use the user-defined tag that you created.

- Phil
Title: Re: .ExifTool_config for Dummies
Post by: cali92rs on April 21, 2012, 03:03:51 AM
It seems like I am close, but not quite there yet.
I run this command line:

exiftool "-exif:FocalLength<copy2:FocalLength" "-exif:FocalLengthIn35mmFormat<Calc35mm" MYIMAGEFILE.DNG

And I get confirmation that 1 file was updated, I check the Exif data and focal length = 8.1mm and 35mm equivalent = 12.1mm, so it looks ok.
However, when I enable profile correction in LR3 Develop, nothing happens.
Any idea why?

Thanks again in advance!
Title: Re: .ExifTool_config for Dummies
Post by: Phil Harvey on April 21, 2012, 07:13:15 AM
Sorry, I don't know what information the LR3 profile correction requires.

- Phil
Title: Re: .ExifTool_config for Dummies
Post by: cali92rs on April 21, 2012, 01:45:20 PM
I finally got it!

My command line should've looked like this:

exiftool '-exif:FocalLength<copy2:FocalLength' '-exif:FocalLengthIn35mmFormat<Calc35mm' MYIMAGEFILE.DNG

Instead of the full quotation marks " i was using previously...works great now.  Thanks for all your help Phil!
Title: Re: .ExifTool_config for Dummies
Post by: Phil Harvey on April 21, 2012, 04:30:50 PM
The double quotes in your previous command will work on all systems (Windows and Mac/Linux).

The single quotes in this command will work only on Mac/Linux.

If you are running on Mac/Linux, the two commands are equivalent.

So there must be something else that changed if you think it is now working.  Could it be that you forgot to re-import the image into LR?

- Phil
Title: Re: .ExifTool_config for Dummies
Post by: cali92rs on April 21, 2012, 07:33:38 PM
Phil,

I ran it both ways, single and double quotes, and both yielded the same results, as you said would happen.
I believe what happened before is that I did not load the .ExifTool_config file, or if I did, it was a different version.  I must have created and re-created 50 versions during my trials and error session.  So I re-created proper the file, with:

print "LOADED!\n";

As prescribed by your FAQ to verify that it loaded correctly, and it worked from there :)

Thanks again :D
Title: Re: .ExifTool_config for Dummies
Post by: Phil Harvey on April 21, 2012, 08:34:35 PM
Great!

You get bonus points for reading the FAQ. :)

- Phil