Many people use Microsoft Photo to “tag” their friend and family in photos with face annotations. What they don’t know is that data is not stored in the standardized XMP regions, but in a proprietary Microsoft XMP namespace. Which makes the data useless for IMatch and other software.
IMatch imports the proprietary face regions as part of the XMP data. It can be viewed, searched and used, like any other tag. But IMatch does not apply the special treatment to this proprietary data that it applies to standard XMP regions – namely converting the XMP regions into IMatch face annotations, using the associated tag to lookup the corresponding person etc. See Working with XMP Face Regions in the IMatch help for full details.
I have no idea why Microsoft would store the face regions in their own XMP namespace and in a format that differs a lot from the official XMP face regions. Windows Photo could just use the official XMP regions and it would work the same – with the added benefit that the data would also be available in software like IMatch or Lightroom.
Probably another customer lock-in strategy of sorts. This is why I don’t like proprietary metadata – it’s never good for the customer, only for the software company.
The conversion between the proprietary Microsoft regions and the standard XMP regions is a bit difficult, because the structures are quite different. Nothing that could be done by simply copying metadata around using a Metadata Template or the Metadata Mechanic in IMatch. The conversion requires some “active” logic.
Thankfully, Phil Harvey from ExifTool created a solution for this particular problem. An ExifTool config file which converts the proprietary Microsoft face regions into standard XMP face regions. Awesome! Thanks, Phil.
If you want to make the proprietary Microsoft Photo face regions available for XMP-compliant software like IMatch, you can run ExifTool from the command line and let it convert the face regions. IMatch afterwards rescans the modified files automatically and converts the XMP face regions ExifTool has created into proper IMatch face annotations, assigns person and all the good stuff.
How To Do It
Assuming: a) IMatch is installed on the PC and b) the images you want to convert are in the folder c:\My Images: c) the files have no pending write-back. Else write-back first in IMatch to avoid data loss.
Open a command prompt window from the START menu. Search for cmd and press Enter
Use the cd command to make c:\My Images the current directory:
cd "c:\My Images"
Copy & paste this command line (this is a single line, don’t add line breaks) into the command prompt window:
This command converts the Microsoft Photo face regions into standard XMP face regions for all .JPG files in the current directory.
ExifTool keeps a copy of the original file with the _original extension appended:
DSC01234.JPG => DSC01234.JPG_original
If you have verified that the modified images work, you can delete these backup copies. If you don’t want ExifTool to create these backup copies, add the -overwrite_original option to the above command line:
Repeat these steps for all folders containing files with proprietary Microsoft Photo face regions.
Lesson to learn: Before you touch metadata in applications, make sure you understand where the data is stored and if you can access the data also in other applications. You don’t want lock yourself in, after all.
We’re happy to announce the release of IMatch 2021.16.2 and a compatibility update for our IMatch Anywhere product line. See the detailed release notes for an overview of all new features, changes and bug fixes.
Highlights in this New Release
There are the most important enhancements and new features in the new edition of the digital asset management system IMatch from photools.com.
Favorite Enhancements
Alt + left-click now triggers the “Goto” command, where available (folders, categories, collections, events, people).
Event Favorites now have a primary action (add to Event) and secondary action (remove from Event). This only works if the Favorite was created for a file-based event.
People Favorites now have a primary action (link to Person) and secondary action (un-link from Person).
Content-aware (Smart) Cropping for Design & Print
When you set the Batch Processor or Design & Print to fit an image into a specific size or container (e.g., fitting an image into a square container), cropping the image vertically or horizontally is usually required.
Both features offer multiple ways to align the image and to control where to crop, e.g. top/left or bottom/right. This version of IMatch introduces a new Smart mode which tries to prevent relevant portions of the image from being cropped.
Consider the following example: Left side: Fill and Center. Right side: the new Fill Smart mode:
The image is automatically horizontally shifted to prevent the faces from being cropped. This new option will be useful for situations where you process images with different arrangements and sizes in an automatic fashion.
Collection Performance
Performance improvements for collections when adding / removing files to/from collections, e.g. setting, removing or toggling a rating. Under some conditions (and for larger databases), changing a collection by adding/removing files could take several hundred milliseconds (up to half a second), which could impact user’s workflows.
Map Panel – Support for Drag and Drop
You can now assign GPS coordinates to files by simply dragging the files from a File Window into the Map Panel.
LibRaw Update to support Olympus OM1 Raw Variant
Yes. Olympus introduced yet another proprietary RAW variant with their OM1 model. And they don’t provide a WIC codec for their cameras, which means that WIC will support this camera only when Microsoft updates their WIC codecs…
LibRaw thankfully supports this new format in their latest version (not in their official snapshot release). We’ve decided to integrate this version into IMatch for timely support for the OM1 variant.
IMatch and ExifTool now implement the IPTC Photometadata Mapping Guidelines version 2202.1. See https://iptc.org/std/photometadata/documentation/mappingguidelines/ for more information.
New duration Variable formatting function
The new duration function calculates the difference between two timestamps in units and outputs the result. For example:
{File.DateTime|format:YYYY:MM:DD hh:mm:ss;duration:now,years,one year,$ years,less than a year}
This variable calculates the difference between the File.DateTime and the current date and time, and outputs: one year, if the difference is more than 0 but less than 2 years, n years, if the difference is equal or greater than 2 years, where n is the number of years, and less than a year, when the difference is less than a year.
This variable can be used for a multitude of purposes, e.g. showing a “How long ago did I create this image?” in File Windows, Design & Print or other features.
New Workflow Categories
We have added two new categories to the IMatch Workflow Categories: No Author (with the formula "@MetadataTag[creator,novalue]") and No Headline (with the formula "@MetadataTag[headline,novalue]").
See the detailed release notes for an overview of all new features, changes and bug fixes.
Using smart file names can be a key for successful digital asset management. Some users prefer to include dates in file names. Other users include project codes or use a globally unique file naming schema. Whatever naming schema you decide to use, IMatch has tools to make the job easier.
IMatch includes a powerful tool named Renamer. With it you cannot only rename files in smart ways, but also copy and move files, add folders on-the-fly, create automatic backups, and more…
The Problem
Cameras often use file names like _DSC12345.jpg, which are not really informative or useful. You cannot tell anything about the contents of the file by just looking at the file name. And, if you use more than one camera, you may even end up with duplicate file names. And that’s never a good idea.
Although the physical file name is not that important anymore when you use a Digital Asset Management (DAM) system like IMatch. But it’s always better to be able to work with your files properly outside of your DAM, e.g. when you upload files to your web site or send them out to clients or a printing service.
The Solution
The IMatch Renamer tool enables you to create consistent and descriptive file names – automatically, when new files are indexed by your database, or later at any time. Whether you use simple numerical file names or you include additional information like date and time, a project code or even metadata like title or job id is up to you.
Some Examples For File Naming Conventions
_DSC12345.ext
This is the file name format used by most digital cameras today. Each image file gets a sequential number and the prefix DSC (Digital Still Camera). A leading underscore is added if the file is in the Adobe RGB color space.
2015-08-01_12345.ext
This file name consists of the year-month-day the image was taken, plus a sequential number. This format is pretty common because the file names are not only descriptive but also ensure that the images are sorted by date in software like Windows Explorer.
P8781-00121.ext
P8781-20150801-00121.ext
A file naming schema which uses a project code (P8781) and then a 5-digit sequential number which identifies each file in that project. The second variant also includes the date and time.
The Renamer has a special project code feature which prompts you to input a project code automatically.
20150801-usa-new-↵
york-890.ext
A file name which consists of a date stamp, the country and city name where the image was taken and a sequential number. File names like this are great when you travel a lot.
The Renamer can construct such file names from the location metadata in the image automatically.
A file name how it is often used for files created in research projects. Each file name contains important information about the object(s) shown in the image.
The Renamer can construct such file names automatically by accessing both metadata stored in a file and global variables, e.g., the project name or the location and lab data.
Your naming convention make be based on one of these examples, or you create your own unique way of naming files. The Renamer in IMatch is flexible enough to handle (almost) everything you can come up with.
The IMatch Renamer
To rename files, select them in a File Window and then bring up the Renamer by pressing <Ctrl>+<F2>. The Renamer has a comfortable user interface which allows you to produce file names by adding one or more steps. There are steps to:
[list_font icon=”check-square-o” list_item_1=”add date and time in various formats” list_item_2=”add plain text and IMatch variables” list_item_3=”converting the case of file names” list_item_4=”including selected parts of the original file name” list_item_5=”replacing or delete text” list_item_6=”removing (leading/trailing) digits” list_item_7=”adding unique or sequential numbers” list_item_8=”copying and moving files” list_item_9=”creating folders on-the-fly, even with names based on variables” list_item_10=”prompting the user to enter a project code when he renames files” list_item_11=”…”]
While you add or change steps, the embedded preview allows you to see the resulting file names. No changes are made to the file system, the Renamer merely simulates the rename operation. It also checks for and indicates duplicate file names you may produce with your steps.
Example: Date and Sequence Number Format
The user interface of the Renamer.
In the screen shot above we create file names in the format: YYYY-MM-DD-nnnnn.ext format. At the bottom of the dialog box you see the source file name and destination file name. If you rename more then one file, you can click on the Preview… button to see the resulting file names for all files.
Example: Including the ISO Country Code and City Name
To create the more complex YYYYMMDD-Country Code-City Name-sequence number format explained in the table above, we just need a few more steps:
The first step adds the date in the YYYYMMDD format. Then we add a – and the ISO country code. We follow up with another – and then the name of the city. The country code and city name are retrieved directly from the XMP metadata of the file by using the corresponding IMatch variables. The final two steps add yet another – and a 5-digit sequence number. For the sample image used for this demo, the resulting file name is: 20140321-USA-New York-28190.jpg.
See the Renamer topic in the IMatch help system for numerous additional examples and tips & tricks.
Important: Buddy and Sidecar Files
Most of the RAW processing software in use today (and also image editing software, audio and video processing tools) produce sidecar or ‘buddy’ files for each file you process. A typical example are XMP files which contain the XMP metadata for your RAW fies. If you have a _DSC12345.RAW file, the XMP file will be named _DSC12345.XMP.
RAW processors or image editing software also create a variety of other files with settings, configuration data or history info for each image you process in these applications. Sometimes these files are in the same folder as the image, sometimes in sub-folders.
When you rename an image file, it is important to rename the sidecar and buddy files as well. Otherwise you may break the ‘link’ between the image file and the sidecar files which can have dire consequences.
The Renamer cooperates with IMatch’s unique file relations concept and thus ‘knows’ about buddy and sidecar files – even if these are not indexed by your IMatch database. The Renamer automatically ensures that buddy and sidecar files are renamed together with the image file.
File Names in Digital Asset Management
The Renamer tool in IMatch enables you to create descriptive and consistent file names. It offers easy features to include date and time, arbitrary metadata, text and automatic numeric sequences in file names. By using the embedded preview you can test your rename results without making changes to the file system. The Renamer also cooperates with the unique file relations feature in IMatch to automatically rename buddy and sidecar files when the corresponding image is renamed.
The ability to export metadata in various formats is a key feature for every digital asset management system. IMatch includes a wide range of export modules which allow you to export attributes, metadata and other data in a variety of formats.
Exporting Metadata and Attributes
This know-how article covers the flexible Text Export module which enables you to create text files in a variety of formats. The export module supports both UTF-8 and UTF-16 (Windows® UNICODE) encoded text, which allows you to create output which works on all platforms and operating systems. IMatch enables you to output virtually every metadata field and Attribute it maintains in the database, ready to imported into other applications and systems.
These output formats are supported:
CSV Files (e.g. for Import into Microsoft® Excel or similar products)
Tab-delimited formats (ideal for many databases)
XML Files (popular cross-platform format)
JSON Files (to process the results in JavaScript or similar)
Each format can be customized to match whatever format the importing application expects. As a result, you can export virtually anything that is stored in your IMatch database conveniently into other applications.
What To Export
You control the data to export via standard IMatch variables, which gives you complete access to all metadata and Attributes IMatch maintains for your files. Using variable formatting functions you can further format and modify the output to meet your requirements.
Each file processed by the export module produces one ‘record’ in the output. The resulting record can have any number of ‘fields’. A field has an (optional) name and a value. The name is plain text and the value is composed from one or more variables and literal text. For example:
FileName:{File.NameExt}
The name of this field is FileName and the value comes from the variable {File.NameExt}, which returns the file name and extension of the file (e.g., beach.jpg). Field name and value are separated by a colon:
To export multiple fields per record, just add additional declarations on additional lines:
This declaration exports 4 fields per record. To keep things tidy, this example uses shortcodes like createdate instead of the long standard variable names. See the IMatch help for details about shortcodes.
Formatting Variables
By default IMatch exports date and time information in your local date&time format (as configured in Windows). This may cause problems when the importing application expects date and time in a specific format.
To prevent any problems in this area, we use the format function together with the createdate variable to produce a date and time format in standard ISO YYYY-MM-DD HH:MM:SS format. This avoids any ambiguities.
IMatch supports dozens of variable formatting functions. Please see the Variables help topic in the IMatch help for a full list and examples.
Tip: Var Toy And Other Helpers
Not only for this case, but in general when you work with variables in IMatch, the Var Toy App can be a big help. This app allows you to enter a mix of literal text and variables and to immediately see the result.
Open an App Panel via View > Panels > App Panel (or <F9>,<1>) and select the Var Toy App in the drop-down list at the top of the App Panel:
The VarToy allows you to interactively try out variables. You can paste variables and text into the upper edit field and the App immediately displays the result. Use the Browse Variables… button to open the standard Variable Browser.
Copy as Variable
The Metadata Panel has a useful command which allows you to copy the corresponding variable for a metadata tag into the clipboard. Right click any caption in the Metadata Panel to open the context menu:
The Copy as Variable command copies the variable for the clicked metadata tag into the Windows Clipboard. From there you can insert it into the VarToy App or into whatever feature you want to use it with.
Running the Text Export
Select the files you want to include in the export and drop them on the Text Export module in the Import & Export Panel. You can also drop one or more folders, categories, collections or time-line nodes.
Drop files or other objects on the Text Export module in the Import & Export Panel
If the panel is not visible, open it via View > Panels > Import & Export or <F9>,<X>.
After you have dropped the objects, the Text Exporter opens a dialog box where you can configure the format and options for the export:
The options in this dialog are mostly self-explanatory. Press <F1> to open the corresponding topic in the IMatch help, which explains each option in detail. The help also contains examples and suggested output formats for a variety or common applications.
We create a standard CSV (comma-separated values) file in this case. Fields are separated with a comma (,) and each row (aka ‘record’) is delimited with a carriage return / line feed pair. This is the format expected by most Windows applications and Office suites.
At the bottom of the dialog you see the field definitions we have defined earlier. We just coped them from the VarToy App into the input field in the Text Export module. You can of course also enter and edit them in this dialog directly.
The Result
After running the export for 3 sample files, we can open the resulting file in Windows Notepad for a quick check:
Or we open it directly in Microsoft® Excel (or Open/Libre Office):
CSV files like this using , ; or <tabulator> as field separators can be imported by most Office applications, statistic software, database systems etc.
XML Output
If you have more sophisticated applications, they often support XML or JSON as an import format. If we run the same export again, but this time switch the output format to XML, we get a result that can be easily re-formatted and imported by a wide range of applications across all platforms:
Note that the only change was switching the output format to XML. Our field definitions are the same as before. The Text Export module automatically used the field names as node names for the XML file and converted the values into proper XML data records.
Summary
The Text Export module in the digital asset management system IMatch is a flexible tool for exporting metadata and Attributes into other applications. It can produce plain text and CSV files, but also more advanced formats like XML and JSON. Using a mix of IMatch variables and text you can control the data you export, and the format in which the data is exported.
Whether you want to reuse data stored in your IMatch database in Excel or a Word Processor or you want to copy data into other database systems, the Text Export module is a great and easy way to handle this.
IMatch File Windows use a range of icons to present metadata and digital asset states. The file collections, the XMP rating and label, category assignments and more.
Sometimes it may be desirable to display additional icons. Maybe you want to indicate images taken at high-ISO settings, which may require extra care during post processing. Or you want to show a warning icon for files which have no keywords or description – as part of your quality management.
Some custom icons in the IMatch File Window.
Using Custom Templates
The general idea is to use a custom template in your File Window layout. This allows you to display arbitrary variables inside the File Window panels, and also to use some XAML markup to load and display icons.
To use a custom template, open the File Window Layout Editor, add a new layout (or clone an existing layout) and switch the Attribute property of the cell you want to use to the Custom Template setting.
Switching the Header 1 cell to a custom template allows us to display a free mix of text, variables and XAML markup directly in File Window panels.
Add a ‘No Keywords’ Indicator
For this example, we want to display an icon when a file has no keywords. The variable {File.MD.hierarchicalkeywords} returns all keywords of a file. If it is empty, the file has no keywords. We use this to produce this variable expression for our custom template:
We combine the hasvalue and default functions (see IMatch help on Variables for details) to output the text ‘No Keywords’ if a file has no keywords. To test this, copy and paste the above expression into one of your file window layouts. Or use the Var Toy App in the App Panel to try things out.
Use <Image> to Load Images
To display a custom icon instead of the text ‘No Keywords’, we add a XAML instruction which allows us to render an image. The <Image> tag does the job:
In this example, we load the image file stored in ‘c:\data\imdb\nokeywords.png’. This file is a 32 x 32 pixel PNG file with a transparent background. This size works best for our layout, but you can of course also use smaller or larger icons.
We combine this markup fragment with the custom template created earlier to produce the final custom template:
Write everything in a single line. The line breaks ↵ here are for layout purposes only.
We also set the Size of the ‘Header 1’ cell to 34 pixel to make room for the icon. The result in the File Window looks pretty cool:
This little icon tells us that the file has no keywords yet. Awesome.
Add a ‘Missing Description’ Icon
You can display custom icons in any of the four header and eight footer cells – and you can even display multiple icons per cell. A lot of flexibility here.
To add a second icon which indicates missing descriptions, use this custom template:
As before, we test if a given metadata tag (in this case the XMP description) is empty. If this is true, we use an <Image> XAML tag to load and display an icon.
For this example, I have combined both tests and icons into the same ‘Header 1’ cell:
The left file has keywords, but no description. The file in the middle is missing both, and the file on the right has a description but no keywords. You immediately see which files require some additional work.
A Note on ‘Escaping’
IMatch by default escapes variable values to make them safe to use with XAML. This means that special characters like < or > are replaced by their safe counterparts < or > to prevent metadata contents to accidentally break XAML markup in the File Window. This is usually exactly what you want, to be able to safely display all metadata in File Windows.
If the variables you use actually produce XAML, escaping may get in the way, preventing you from displaying images or other markup content. The default: function used above is an exception, because it does not replace unsafe characters. But if you use markup in other functions, you need to use a trick to prevent escaping. This trick involves the pereplace function, which allows you to replace text after IMatch has performed the escaping when processing variables.
In this example we use two steps:
1. Emit the value HV when the file has keywords (hasvalue) and XAML markup for the default: case
This way, when IMatch performs escaping on the variable, it only sees the safe value HV. Afterwards we replace these placeholders with XAML markup that loads and displays images.
Summary
By using custom templates in file window layouts you can display arbitrary variables in exactly the format you want. By adding a bit of XAML code, you can also load images or use custom colors for text and background. See the IMatch help for more info on XAML markup supported by IMatch.
Use the techniques presented here to add custom indicators for all kinds of purposes. You can improve your digital asset quality management by adding visual clues right into the File Window. When you catalog images, you can use icons to indicate high-ISO files, files taken with specific cameras, by specific photographers. Or you use icons to highlight files with specific keywords or metadata contents.
The code to load and display the icon is always the same. You just vary the variables you use to determine whether or not to display the icon, or which icon.
Variables are a flexible tool for displaying custom metadata in features like File Windows, Viewer, Slide Show, Renamer, Batch Processor and elsewhere. The digital asset management software IMatch gives users access to over 10,000 metadata fields, from all relevant formats, including XMP, IPTC, EXIF, GPS, ID3, PDF and more.
Accessing Metadata Fields via Tag Names
IMatch uses a consistent naming schema for metadata variables, based on the native ExifTool syntax. For example, to access the frequently used XMP title and description tags via variables, you use:
Of course you don’t need to remember or type these rather long variable names. You can just pick them in the Tag Selector dialog. See the IMatch help system for details.
IMatch Standard Tags & Shortcodes
IMatch defines a set of standard tags, which include the most frequently used metadata tags from XMP metadata and other formats. The Tag Selector dialog presents these tags in a separate tab, which makes them extra easy to work with.
A second (and often overlooked) benefit of standard tags is that IMatch defines a shortcode for each of these tags which can be used in variables. The above example using shortcodes would look like this:
{File.MD.title}
{File.MD.description}
A lot cleaner and easier to remember. And when you work with complex sets of multiple variables, shortcodes can improve readability a lot.
Search the IMatch help system index for shortcode to find the corresponding topic which lists all 80 available shortcodes.
Sometimes you need to find all files which have no data for a given metadata tag. Maybe you need to find files without a description, or files which have no keywords yet. This can be easily achieved with the digital asset management system IMatch.
We use the Value filter for this purpose. Open the Filter Panel via View > Panels > Filter or the keyboard shortcut <F9>,<L>. If no Value filter is visible in the panel, click on the Gear icon in the toolbar and choose it from the drop-down menu.
In the Value filter, select the metadata tag to use. For this example, we used the Description tag. This procedure of course works with all 14,000 metadata tags currently supported by IMatch.
Enable the option Files with value. This tells the filter to search for all files which have data in the selected tag. It removes all files without data from the File Window.
Now enable the option invert the result. The filter now filters out all files which have data for the tag, leaving only files without data in the file window. And this is what we wanted: All files without a description.
As usual, the filter works on the current scope (what you ‘see’ in the File Window). To find all files without a description in a folder, select the folder. Or multiple folders. You can also select one or more categories, collections, time-line nodes…
To find all files without a description in your entire database, just select the Database node in the Media & Folders View or the @All category in the Category View.
[font_full1 title=”” icon=”info-circle” color=”light” size=”large”]If you need this filter often, save it. You can then apply the filter any time by just clicking it in the filter list in the Filter Panel.[/font_full1]
The File Window in IMatch can be customized in many ways using file window layouts. You have full control over whether you use a thumbnail or a tabular layout and over the data to be included for each file.
This know-how article explains some tricks which you can use with custom templates in conjunction with variables.
See the File Window Layouts help topic in the IMatch Help system for a full overview of all available features and many examples.
Custom Templates and Layouts
When creating a custom layout, you usually just pick the IMatch data elements and metadata tags to display in the file window. Maybe also change the font size, alignment or color. This already gives you a lot of control over the data you see for each file.
Even more options are available when you switch the layout element to use a custom template. This allows you to use IMatch Variables and all related functionality, plus a subset of XAML formatting to control font sizes, colors and other aspects of the output.
You can use custom templates for each of the four headers and 8 footers, mixing them freely with standard elements. In the following example we configured Header 2 left to display the XMP headline. We also changed the font size and the color:
The file window layout editor.
The resulting file window layout displays the contents of the XMP headline tag under the file name, in a bigger font and a orange color:
We could use any other variable, or multiple variables in the template. Whatever is needed to produce the output you want.
Displaying Lists
Some variables return lists of elements, e.g., the XMPhierarchicalKeywords variable or the Categories variables. IMatch separates list elements with the list separator character configured for Windows (usually ; or , ) . This results in values like “vacation;summer;family;holiday;Hawaii”.
IMatch offers a wide variety of variable functions, which allow you to manipulate the results of variables. By using the replace function, we can replace the default list separator ; with something different.
For example, if you want to display each keyword in a separate row, replace the ; with a line feed {lf}:
{File.MD.hierarchicalkeywords|replace:~;=={lf}}
Note that we use the short code for the variable instead of the full variable name ({File.MD.XMP::Lightroom\hierarchicalSubject\HierarchicalSubject}). The output is identical, but using the short code makes it easier to read.
To make room for the keywords, we increased the height of the footer to 120 pixel. If there are more keywords than there is room in the thumbnail panel, IMatch automatically crops the excess keywords.
The resulting file window layout displays the keywords assigned to the file in the footer, with one keyword per row:
A file window layout which displays XMP hierarchicalSubject values (keywords) in a ‘one keyword per row’ layout.
An Alternative: Let It Wrap
The approach to put each keyword on a single line may be a waste of screen space when you increase the thumbnail size. In this case there is likely enough room to fit multiple keywords per row.
To allow for that, we replace the ; separator with something like ,<blank> (a comma followed by a SPACE character). This allows the file window layout engine to fill the available space, automatically wrapping at the SPACE to create additional rows as needed. This variable
{File.MD.hierarchicalkeywords|replace:~;==, }
yields the desired result:
The same file window, but with larger thumbnails. This makes room to fit multiple keywords per row. The layout engine in the digital asset management IMatch automatically re-formates the keywords to fill the available space, wrapping into separate lines as needed.
Displaying IMatch Attribute Data
Attributes allow you to create your own database inside the IMatch database. They are used to store custom data for each file, independent from the file format or the supported metadata. Attributes are great for purposes like keeping notes per file, submission tracking, billing, etc.
You can store any number of Attribute records per file. The corresponding variables return all values for a given attribute in a list semicolon-separated, just like the XMP hierarchicalSubject variable we used in the examples above.
In a recent post in the photools.community, a user asked how he can display this data in the file window. There may be multiple records per file, and each record may have multiple attributes.
For this example, we use a typical submission tracking Attribute Set. The IMatch user keeps track of which stock photo agencies (or web sites) he has submitted a file to, the state of the submission and the revenue. In the IMatch Attributes Panel, this looks like this:
A submission tracking Attribute Set in the Attribute panel. Click for a larger view.
See the Attributes topic in the IMatch help system for detailed information about the IMatch Attribute database. The Submission tracking is used there as an example as well.
The file used in the screen shot above has 3 attribute records, each keeping data about one submission. If you want to display this data (or some of it) inside the file window, you can use the same method described in the keywords example above: You use a custom template for the file window layout, and control the data to display with IMatch variables.
But how to deal with the multiple records per file? When we just use the variable
{File.AT.Submissions.Client}
IMatch returns a list of all values for the Client Attribute, separated with a semicolon : DaguckstDu Stock Fotos;Bright Eyes Stock Photography;Whoa! Stock. The same happens for {File.AT.Submissions.Amount}: 280,00 $;450,00 $;250,00 $. Not really helpful. We would like to see the client, the date the file was submitted and how much money we made from it next to each other, in the same row, somehow.
The Trick: Indexing Variables
To achieve this, we use the index variable function, which allows us to access individual elements (aka records) in the variable. For example:
{File.AT.Submissions.Client|index:0}
returns the name of the Client from the first record (variables start counting at 0). With index:1 we get the second record, and so on. Now, after making some experiments in the awesome Var Toy App which is included in IMatch (see the App Panel and the IMatch help), we created this:
We use three variables to access the Client, the Date Submitted and the Amount attributes. With index:0 we tell IMatch to return only the first record. The resulting output is:
DaguckstDu Stock Fotos 2015-04-06 280,00 $
which is exactly what we want. Now, we just duplicate this variable group a number of times to access the 0, 1, 2, 3 and 4th record (we assume that we don’t sell each image more than five times):
Each of these variable groups produces one row in the file window. If a file has only 1 or 2 records (or none), IMatch automatically suppresses the output of the remaining variables., no rows are emitted. Which is of course exactly what we want.
We used the prefix and postfix functions to add ( and ) around the date instead of just adding them as literal text. This means that the parentheses will not show when the variable itself is suppressed.
This may look a bit complicated, but it really isn’t. It’s just variables, but with a neat twist in order to create this advanced example. To give this a try, we created a tabular file window layout and the five groups of variables from above to a custom template:
Each submission is displayed with the name of the client, the date of the submission and the amount of money created from that submission. Awesome!
Summary
File Window Layouts in IMatch enable you to control the data displayed in the file window. You can easily control the attributes or metadata to display, and also choose font sizes and colors.
If you need more advanced layouts, or you want to have fine control over the data to display, and how this data is formatted, you can use custom templates. In combination with IMatch variables this gives you a lot of options to work with.