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-10-12 08:08:16-07 by bogdan
Config file for unknown tags
Hi Phil,

Scenario: I've used the folowing command:
exiftool -makernotes:all -U -s photo.CR2
-where I got (among a lot(!) of other things):
... Canon_ShotInfo_0x0017 :20 ... Canon_CameraInfo450D_0x0008 :20 ...


Now, I'd like to examine/compare only above two (unkown) tags. It seems such things can be done by using "config" file. I've "studied" your config example file, but I simply don't know how to adapt it for my needs.
What I would like to accomplish is something like:
set TagName of Canon_ShotInfo tag 0x0017 to name MyTagONE set TagName of Canon_CameraInfo450D tag 0x00 to name MyTagTWO

..and then use exiftool as (something like):
exiftool -Makernotes:MyTagONE -Makernotes:MyTagTWO photo.CR2


Could you, please, give me "config" example which could do that?
If possible, can you make it that way, that one of above tags (just for example) can be written too?

And related question: does filename of ".ExifTool_config" matter? I mean: can I have two different config files inside working directory, like:
Canon.ExifTool_config
Nikon.ExifTool_config
-are both called when executing exiftool?

That's for now... thanks in advance.
Bogdan
Direct Responses: 9028 | Write a response
Posted on 2008-10-12 11:42:20-07 by exiftool in response to 9027
Re: Config file for unknown tags
Hi Bogdan,

Here is your config file:

%Image::ExifTool::UserDefined = ( 'Image::ExifTool::Canon::ShotInfo' => { 0x0017 => 'MyTagOne', }, 'Image::ExifTool::Canon::CameraInfo450D' => { 0x0000 => 'MyTagTwo', }, );

The tags will be writable since tags in these tables are writable by default.

Currently, exiftool only reads one config file, so all tags must be added to the same file because exiftool only looks for a file with the name ".ExifTool_config".

- Phil
Direct Responses: 9029 | Write a response
Posted on 2008-10-12 18:44:32-07 by bogdan in response to 9028
Re: Config file for unknown tags
It seems to be so simple (and logical)... however, it doesn't work here.
I've copy/pasted your script and saved it as "test.ExifTool_config" into the same (working) directory, where image files are. Btw. I've made a typo for "MyTagTwo": it's tag number is 0x0008 -what I've corrected in your script.
Now, when executing:
exiftool -makernotes:MyTagOne photo.CR2
-I get none returned message from exiftool. If I execute (for example):
exiftool -makernotes:MyTagOne -makernotes:OwnerName photo.CR2
-I get only OwnerName value and nothing else listed.

Any idea? Thanks for patience...
Bogdan
Direct Responses: 9033 | Write a response
Posted on 2008-10-12 21:16:11-07 by exiftool in response to 9029
Re: Config file for unknown tags
Hi Bogdan,

The file must be called ".ExifTool_config", not "test.ExifTool_config". I hope this is the only problem, but check the FAQ for a few other hints if you still have problems.

- Phil
Direct Responses: 9036 | Write a response
Posted on 2008-10-13 04:20:48-07 by bogdan in response to 9033
Re: Config file for unknown tags
Hi Phil,

I've tried that before too, but when renaming, Windows insist on some name before dot. That is, I can only have:
something.ExifTool_config
or ExifTool_config -without dot.

Thus, I was thinking, with ".ExifTool_config" you've emphasized importance of suffix. I'll go thru FAQ later... Thanks.

Greetings,
Bogdan
Direct Responses: 9037 | Write a response
Posted on 2008-10-13 07:55:44-07 by kailash in response to 9036
Re: Config file for unknown tags
Hi Bodgan,

I use WinXP Home Edition and the Windows Explorer does not allow renaming of file to filenames starting with a dot. However, the file can be renamed using the command prompt.

Start the command prompt:
"Start Menu -> Programs -> Accessories -> Command Prompt"
OR, type cmd on the "Start Menu -> Run window", and press enter.
Change directory to your exiftool directory and use the following command:
ren "temp.ExifTool_config" ".ExifTool_config"

Hope this helps.

- Kailash
Direct Responses: 9039 | Write a response
Posted on 2008-10-13 15:31:09-07 by bogdan in response to 9037
Re: Config file for unknown tags
Thank you Kailash!
I'm quite familiar with "old DOS", but didn't know that "Command" allows that (while WinExplorer doesn't). And for such simple thing.... who would bother to read FAQ :-)

It may be of interest for others too: In Config example, there's explained (if I understood correctly), that ".ExifTool_config" file can be in "working" directory too (which I undersood as "current" directory). But that doesn't work: so I've placed config file into Windows directory -and now it WORKS :-)

Thanks again to both... best wishes,
Bogdan
Direct Responses: 9042 | Write a response
Posted on 2008-10-13 22:13:36-07 by exiftool in response to 9039
Re: Config file for unknown tags
Hi Bogdan,

Glad you got it working. ExifTool looks in the exiftool application directory and your HOME directory, and only defaults to the current directory if the HOME directory can not be determined. Usually, on Windows your HOME directory is c:\Documents and Settings\USER, but this depends on your environment settings. You can also set the EXIFTOOL_HOME environment variable to load the config file from wherever you want (ie. I think the syntax on windows should be something like "set EXIFTOOL_HOME some_directory", but don't quote me on that). But probably putting the config file in the application directory as you have done is easiest.

- Phil
Direct Responses: Write a response