Import of data into the attributes

Started by JoeHolzwurm, July 02, 2013, 09:38:12 PM

Previous topic - Next topic

JoeHolzwurm

I tried to immport EXIF and IPTC data into the attributes as I did it in IMatch 3 with the properties but I was not successful. Is this still in work or did I make a mistake?

Mario

#1
IMatch 3, in the old days, allows users to import IPTC and EXIF data into properties in order to cache this data in the database. This way the user could also view this information when files were off-line. This was no longer that important when IMatch started to use XMP metadata back in 2006, which was always cached in the database.

IMatch 5 of course allows you to import metadata into Attributes:

Open the Import & Export panel (F9,X)
Select the files for which you want to import metadata in a file window and drag these files on to the Import Metadata into Attributes import module. You can also drag a folder, category, collection or the entire database to the import module.

In the dialog, choose the Attribute set you want to import data into, and the metadata tags from which you want to import the data. The script uses a fancy HTML user interface (new for scripting in IMatch 5) and the standard tag selector.




Tip: If you had just typed Attributes in the Index tab in the IMatch help you would have found this info immediately. The help has a separate topic on importing metadata into attributes.



[attachment deleted by admin]
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

BenAW

Quote from: JoeHolzwurm on July 02, 2013, 09:38:12 PM
I tried to immport EXIF and IPTC data into the attributes as I did it in IMatch 3 with the properties but I was not successful. Is this still in work or did I make a mistake?
If you look at the top of the File Window there is a Menubar, last item is called Help.
Click on Help and a page opens like in the screenshot.
Now select Index and type in this case "Attributes" in the search.
Double clicking on Import Metadata would have given the answer to your question.
This also works when you type other words in the searchbar.

[attachment deleted by admin]

JoeHolzwurm

Nice that I always I get told to read the help.
I DID READ THE WHOLE HELP CHAPTER FOR THE ATTRIBUTES.
And I found the metadata import in the import & export panel.
And I selected a metadata tag for all my attributes but the import gave me error messages.

Ok, I should have written that before. My fault.
At least I now know that it should work and I will have a look at that.

JoeHolzwurm

Now I found my mistake:
In the dialogue box with the list of Metadata I also get the attributes listed and I select an attribute for each attribute. This cannot work.
But: In the list of the Metadata variables I do not find the EXIF and IPTC Metadata. How do I get these variables?

Mario

QuoteAnd I selected a metadata tag for all my attributes but the import gave me error messages.

Important info. Can you quote the text of the error message?

QuoteI also get the attributes listed and I select an attribute for each attribute.

Yes, the variable selector dialog box shows all available variables, including the variables representing the Attributes in your database. Although I did not explicitly test this,  you could use that to copy data between Attributes.

QuoteBut: In the list of the Metadata variables I do not find the EXIF and IPTC Metadata.

The script uses the standard Variable Selector dialog box. To access metadata, click on the button labeled Tag Selector... which gives you access to all metadata tags supported by IMatch. If you have not used this dialog yet, see the corresponding help topic for usage instructions.



[attachment deleted by admin]
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

JoeHolzwurm

The error message says:
[45602] 'Ungültiger Wert.'
Value:''
Attribute: 'Image_1.Erstelldatum'

File: Path and name of the file.


I did not get imported any value.
After closing this error message the import dialogue box is behind the program window. The user cannot do anything because this dialogue box has to be closed first but I do not see the box.


I also opened the Tag Selector yesterday but could not identify all the EXIF and IPTC fields. Now I found most of them. I think that in this case the German translation produces some problems to identify the fields because until now the meta tag were in English.  :)  ;)
I think I will identify them...

Mario

The translations come from ExifTool, not from IMatch.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

JoeHolzwurm

I still do not find all tags. Perhaps it would be easier if I could see where each tag of the list comes from (EXIF, IPTC). In IMatch 3 this was easier because the import was defined in different dialogue boxes for EXIF and IPTC. In IMatch 5 the tags could be sorted in different groups.

Some tags are imported with strange values. For example I got an aperture with the value 0.05 while in the EXIF data is shown the value 1/21. The value 0.05 fits to 1/21 but has an unusual format.

Mario

To see all available EXIF metadata tags, open the tag selector dialog, switch to the Search all Tags tab and enter EXIF in the group box.
Tip: When you hover over a tag name in the tag result list, IMatch shows the full tag name in the tooltip.
For detailed information, press <F1> in the Tag Selector dialog box.

IMatch returns metadata values as retrieved from ExifTool.
There are many formatting functions which allow you to modify the output of variables.
See Variables in the IMatch help for details.

Tip Before importing data from variables in your Attributes, use these variables in the Var Toy App to see what they contain.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

JoeHolzwurm

The "Search" subdialogue box is what I need. Thanks for that great tip.
It is great what your program makes possible. The user has just to find the way and with the amount of possibilities this is not easy. Thanks again for your help.

JoeHolzwurm

I now found all the "missing" tags and found some tags I had selected wrong before but I still get strange values with the following tags:
- {File.MD.Exif::Main\37377\ShutterSpeedValue\0} (gives the value 0.05 instead of 1/21)
- {File.MD.Exif::Main\34850\ExposureProgram\0} (gives just a number, for example 3)
- {File.MD.Exif::Main\37383\MeteringMode\0}  (gives just a number, for example 5)
- {File.MD.Exif::Main\41987\WhiteBalance\0}  (gives just a number, for example 0)

I do not know if this is a bug or not.

Mario

#12
{File.MD.Exif::Main\37377\ShutterSpeedValue\0} (gives the value 0.05 instead of 1/21)

This metadata tag is defined as a numeric value and thus the variable returns the number as stored in the file.
If you want to use the formatted value instead, use the corresponding variable function:

{File.MD.Exif::Main\37377\ShutterSpeedValue\0|value:formatted}

Also, instead of picking individual EXIF variables (which may not be filled for all file formats) you should first try to use the Standard Tags (on the first tab in the Tag Selector dialog). In your case, the Shutter Speed standard tag is the best choice because it links to the Composite shutter speed tag ExifTool creates either from the native EXIF shutter speed value, or for RAW formats where this tag is missing, from maker notes and other data.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

JoeHolzwurm

I still don't get it. If I use the additional entry "|value:formatted" I get the variable written into the attribute but not its value.

Mario

Hm, I see  :(

This was a bug in the script, caused by the |. I fixed that right away.
The attached ZIP file contains the corrected version of the script and the HTML file.
Please replace the contents of the folder

C:\ProgramData\photools.com\IMatch5\scripts\system\Import Metadata into Attributes

with the contents of the attached ZIP file while IMatch is not running.


[attachment deleted by admin]
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

JoeHolzwurm

Now it is ok, thank you. (I thought it is again my fault.)