An often overlooked but useful feature in the File Window is to open the selected files in a new result window.
This feature allows you to work on a subset of the images in the current scope, which may provide a better overview in some situations.
Or you use the File Window Search Bar or the Filter Panel to find files in the current scope. Then select these files and open them in a result window, for further searching or filtering. This creates an easy drill-down workflow.
To open all selected files in a new result window, press Ctrl + G , R
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.
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.
The File Window in IMatch offers a wide range of customization options. From simple things like font size or color to custom templates based on IMatch variables, XAML formatting instructions and more. All this is controlled via file window layouts. And you can create custom file window layouts to display exactly the the information you want to see, and how you want to see it.
This article shows you some of the things that can be achieved using custom layouts and IMatch variables. Make sure you read the File Window layouts topic in the IMatch help for general information about how to use File Window layouts.
Displaying A Keyword Counter
Sometimes it might be useful to see how many keywords you have added to a file right in the File Window. We use a Custom Template for this purpose and fill it from the variable containing the hierarchical XMP keywords of the current file (Click on the … button next to the input field to select the variable):
The File Window layout editor. Open it directly from the File Window toolbar.
The Count Formatting Function
The trick is to combine the hierarchicalSubject variable with the countformatting function. This function calculates the number of elements in the variable and returns a number:
The count formatting function can be used with all repeatable tags to count the number of elements.
The Result
The result of this custom template displays the number of keywords in the left thumbnail panel footer:
Displaying All Keywords
If we want to see the actual keywords instead of a count, we use the same variable. But this time, we use a replace function to replace the single ; character used as the keyword separator keywords with ,<space>. The extra space after the comma allows the File Window to wrap the keywords into multiple lines.
We also increase the Size property of the footer to 60 pixels in order make room for multiple rows of keywords:
Note that ; has a special meaning in IMatch variables so we have to escape it with a leading ~
This custom layout now shows all keywords assigned to the file right below the thumbnail:
More Custom Formatting
The file layout above uses some other variables to display more custom information.
The file name is displayed in the top left header, but using a larger font for easier reading.
In the right header we show the first letter of the file extension in upper case. This leaves room for longer file names, but is still sufficient to identify the file format. We achieve this by using a Custom Template together with an IMatch variable:
{File.Ext|substr:0,1;to_upper}
The {File.Ext} variable returns the file extension. We use substr:0,1 to extract the first letter, and to_upper to convert the extension to upper case.
See the IMatch help topic Variables for detailed information about variables and the available formatting functions.
Camera Settings
The bottom right header displays the camera model, shutter speed and aperture used for the photo in a custom format. Again, a mix of variables was used to render this information. We used these variables:
{File.MD.Exif::Main\272\Model\0|replace:NIKON ==}
The Model variable contains the camera name as written by the camera. Since Nikon writes strings like ‘NIKON D4’ into this tag, we use a replace formatting function to strip out the leading ‘NIKON<blank>’. This gives use the model name only: D4.
By default, the shutter speed variable returns the raw value (e.g. 0.02 for 1/200). By using the value formatting function, we tell IMatch to output the formatted value instead: 1/200.
{File.MD.Composite\Aperture\Aperture\0}
We use the aperture variable as-is, but add a bit of XAML formatting (see the IMatch help for details) to output an italicf in front:
You can just use the standard IMatch File Window layouts to display your files. Changing attributes like font size, color etc. is simple. And if you want to display custom information, special metadata tags, maker notes or Attribute data, you can do that by using custom templates in combination with one or more IMatch variables.