Considering its power and low cost, XnView is a must-have
XnView is a photo browsing/editing/metadata tool. It operates in a files and folders environment, like Photo Mechanic, and unlike Adobe Lightroom. It’s available at a price that suggests that there’s no reason not to have a good tool for working with metadata. You might consider it a poor man’s Photo Mechanic. For companies, XnView costs € 26. For individuals, it’s FREE! XnView is available for Mac, Windows, and Linux systems.
Photo Mechanic notwithstanding, I have long recommended that every photographer and photo editor have XnView in their toolkit because it can open so many file types – over 500, according to the XnView website. It’s pretty good at opening corrupted files or files that have the wrong filename extension. And for anyone who prepares photos for use on the web but doesn’t need to edit thousand-frame takes, and, let’s face it, just isn’t going to shell out a hundred and fifty bucks for Photo Mechanic and hundreds more for Photoshop, it’s a top choice.
If you work on Linux, XnView is the runaway best choice (darn near the only choice) for pro level photo selection and metadata operations.
It’s not all wine and roses
All that said, in XnView, you won’t find the stability or the finely-honed user interface of Photo Mechanic or the Adobe Creative Cloud products. There are some rough edges. Some options are a bit technical (which is sometimes a good thing and sometimes not) and you’ll find some unimplemented features or inconsistencies. When thoughts of that sort sneak up on you, pause and remember that you just got a powerful and complex tool for 30.83 US bucks. Or nada. Bupkis. Zilch. As the case may be.
This How-To will only cover working with metadata in XnView. We come back to talk about using XnView (and our other software options) for optimizing photos for the web later. As far as the basic operation of the program is concerned, I leave you to the XnView website and YouTube.
I’ll try here to help you navigate the confusing or nerdy patches.
Working with XnView in the thumbnail browser
XnView has a dockable, tabbed info pane. I keep it on the left, but there are many interface options.
- Open a folder by single-clicking on it in the folder navigation tree.
- Now select the info pane or tab and choose a metadata category, such as IPTC-IIM. If you select
a photo in the thumbnail browser, you will see a read-only view of metadata for that picture.
The pane will show only fields that are populated. You can select various tabs in the pane. ‘IPTC-IIM’ will show you all of the populated IPTC fields you can edit in XnView. “XMP” shows you the populated XMP fields, including the ones that are in common with IIM fields. “Exiftool” shows a combined view of all the fields returned by ExifTool for that photo.
There is a customizable tooltip that will show selected metadata when hovered over a thumbnail. I chose to show the Caption, Copyright, Filename, Create date, File Size, and Dimensions in my tooltip. More on customizing a tooltip later.
If you customize it properly and elect to display it, the thumbnail browser’s slide mount label can present chosen metadata. I’ll talk about customizing that later, as well.
Icons appear on the slidemounts in the browser to indicate what categories of metadata exist for that photo as well as rating, color marker, and tagging (persistent selection) icons.
If you double-click on a thumbnail, a large preview will open in its own tab.
From this preview, you can crop and make adjustments to the image. There is a properties button
in the toolbar that will open a tabbed floating metadata window with the same information that’s available in the Info Pane of the thumbnail browser. The Properties window can also be called from the right-click context menu.
Using the metadata editor
To add metadata to a photo or photos, select photo(s) and press ‘CMD/CTL + I’ to open the IPTC-IIM/XMP editor dialog. This dialog can also be called from the main menu with ‘Tools > Metadata > Edit IPTC/XMP.’
The IPTC-IIM/XMP editor is tabbed for different categories of fields and has a preview of the selected image. If more than one image is selected, there are navigation arrows allow you to move between them.
The big caveat
When you look at this dialog, you’ll immediately notice XnView’s greatest limitation as a metadata editor: XnView can only write to the core IPTC fields. It can write to those core fields in both the IIM and XMP formats. But you can’t write to the extended IPTC fields (The ones that only live in the XMP data.)
Faithful readers know that I always tell people to never assume that a given user out the world will have the capability to see more than the most basic of IPTC fields. And often, they can only see the caption. You should plan your metadata with that in mind. Nevertheless, I really do like some of the extended fields. Rights Usage Terms, is a particular favorite. I miss it here.
You can read all the fields in XnView, but you’re limited to writing the basic ones. (Remember what you are getting for the price you did or didn’t pay. Glass half full.)
‘Save Template’ and ‘Load Template’ buttons appear at the lower right of the dialog. They work pretty much as you would expect, with one twist. (You can safely ignore the ‘Load V1 template…’ button. It’s about backward compatibility with old versions.) Templates are discussed in more detail in this post.
In XnView, you can overwrite a template by simply selecting it in the ‘Choose Template’ popup that appears when you click ‘Save Template’. That means you can use one or more templates as a clipboard of sorts. If you want to copy all IPTC metadata from a photo and paste it on one or more photos, it only takes two clicks to save the information to a reusable template. You can then paste the information by loading the reusable template and clicking ‘Write” on the target picture. It’s not as slick as IPTC Snapshot in Photo Mechanic or Metadata Sync in Lightroom, but it gets the job done.
There are flyout arrows next to most fields. These allow you to insert metadata, like Exif data, into the field. If you choose data in the flyout, the actual data, rather than a variable representing the data, is inserted into the field immediately. So you can’t use this feature to put variables in a template, in the way that you can in Photo Mechanic. (There are other places in XnView where variables do work in the customary way, but not here.)
Drop-down lists under most fields allow you to choose recently-used values for each field.
To apply metadata to a batch of photos:
- Select them
- Open the IPTC-IIM/XMP editor and load a template.
- Add any caption and keyword data that is the same for all the pictures.
- Look on the options tab to be sure you’re OK with the overwrite options. “Keep and add new value” only affects Keywords and Supp Cats (The latter are deprecated. Ignore them unless your client says otherwise.) “Keep original value if new value is empty” is a usually a good idea. And, “Replace only if original value is empty” isn’t usually what I want, but it seems like it could be handy if, say, you don’t want to accidentally overwrite a copyright field.
- Finally, there’s an option for writing only to IIM, only to XMP, or synchronizing the two in your choice of directions. I keep mine set in the XMP-to-IIM direction. Barring rather odd circumstances, you want your IPTC data synchronized between the two formats. Which direction normally doesn’t matter.
- The options are sticky. You don’t have to look at this tab every time. But it never hurts.
- Click ‘Write to all files’ to save the metadata in the dialog to your photos. (Like Photo Mechanic, XnView writes metadata losslessly. So, no worries about damaging your images.)
- Next, you’ll go back and open the editor and add per-picture caption and keyword data. Note that when you edit a field, you’ll be overwriting the whole field with new data. So, say, in the Caption, you would simply insert your caption ahead of the already-existing information. You can’t prepend or append in the way you can in Photo Mechanic.
Metadata considerations when you save photos
There are at least three ways to save files in XnView, and each contains metadata options.
First, there is ‘Export’, available in the Thumbnail browser (One file at a time). From the main menu, choose ‘Tools > Export’, or press ‘CMD+OPTION+S’ on Mac, or ‘CTL+ALT+S’ on Windows or Linux
‘Export’ opens an interactive Save-as dialog. In it, in addition to very granular JPEG options, you have a tickbox that allows you to strip away all metadata as you save the photo. Obviously, barring strange circumstances, you need to make sure that’s not ticked.
From the large preview/editor tab, you have an ordinary-looking Save-As function at ‘File > Save-As’. There are no options for this one. Default file saving options for each writable file type are set in the Preferences. (Preferences > Formats > Write > and choose your file type) You can also access
these settings from the main menu at ‘File > Format Settings’. This time, there are individual tickboxes that preserve, rather than delete, various categories of metadata.
Remember that your IPTC metadata lives in both IIM and XMP formats. So, you don’t want to delete either. Also remember that ‘File > Format Settings’ opens the global format preferences pane, just as if you navigated from ‘Preferences’. Whatever you set here is sticky. It will become the default.
‘CMD/CTL+OPTION/ALT+S’ will open the Export dialog from the large preview. (Oddly, Export isn’t available from the Tools menu in this view.) I’d use this method of saving with non-default settings, instead of changing my defaults with ‘File > Format Settings’. But that’s just me.
Then there’s the powerful Batch Convert command (Tools > Batch Convert). In Batch Convert, there are at least two options that affect metadata.
On the Output tab, there’s a tickbox for ‘Preserve Metadata’. And, for each output file format, there’s a button for ‘Settings…’ There, you’ll find the keep-categories-of-metadata tickboxes in a dialog similar to the ‘Format Settings’ one. Frankly, I don’t know which of the tickboxes in Batch Converter takes precedence over the other.
And, in Batch Convert, you can enable batch actions that write or clean metadata, or both. Note that the batch convert action to write metadata overwrites existing values. There
is no append function. The flyouts by each field here insert into the field variables which will be replaced with the specified value on a per-picture basis.
There will be more about Batch Convert in a future post, when we talk about using XnView to prepare images for the web.
Other metadata functions
You can choose what the tooltip displays in the thumbnail browser in XnView, making the tooltip a very useful gadget.
Go to ‘Preferences > Browser’ to find the tooltip’s settings. There’s an ‘Insert >>’ button at the bottom of the (huge) input field. Use it to insert variables. You can type in words that will always stay the same, like “Photo by: ”, if you’d like.
There are two more pieces of big news here. You can insert some HTML tags, like “<br>” to add a line break and “<b> and </b>” to bold text. And, you can save and load your tooltip templates. So, you can have several for different occasions. That’s very cool. You don’t have a keystroke to turn tooltips on and off – that has to be done from Preferences – but that’s not such a big deal. The tooltip is quite compact and unobtrusive. I just leave it on.
Slide mount labels
At ‘Preferences > Thumbnails > Labels’, you’ll find a tool for configuring the labels that appear on the slide mounts if you select ‘View > View As > Thumbnails + Labels’. You can insert any metadata field from the list on the left as a line in the label, and you can select up to six custom fields from the bottom of the list and populate them with variables. You can even set the color for each line in your label. I made mine with the copyright statement in red. This feature could be a time-and-lawsuit saver if, say, you were using XnView to check photos before you publish them on the web.
Note that there’s another “Labels” tab in the preferences, at ‘Preferences > Metadata > Labels’. This one is where you assign names to the color labels used for sorting images. Yeah. That’s confusing. (But consider how much you did or didn’t pay for the program before you complain about little deals in the UI!)
Clean (delete) metadata
Under ‘Tools > Metadata’, you’ll find ‘Clean…’ This opens XnView’s dialog for deleting metadata. The advice that appears in Photo Mechanic’s dialog for the same function does not appear, but perhaps it should: Do this on copies only, never on a photo that you are going to keep. In this dialog, you can select categories of metadata and remove them from a file. Interestingly, you can strip the Exif thumbnail or GPS data from the Exif while leaving the rest of it. But you can’t do it the other way around – strip all the Exif metadata, except the GPS. Remember once again that your IPTC data is in both the IPTC-IIM and XMP sections and you need both copies.
In the Clean Metadata dialog, you’ll also find a curious tickbox – for ‘Optimize Huffman Table’. Optimizing the Huffman table is a lossless operation that makes JPEG files a little smaller. It saves you a few percent of file size without penalty. XnView offers this as an option in its file saving settings. But from here, you can re-do the Huffman table in an existing file without inflicting the damage of re-saving the image itself. That’s a handy feature. I would never have looked for it in this particular dialog. But now you know. Knowledge is power.
GPS and Exif thumbnail
There’s an edit GPS information dialog in this submenu. It does exactly what it says. Nothing fancy.
There’s also an option for rebuilding the Exif thumbnail, for all those people who want unnecessary stuff in their files. This could be useful if, for some reason, you have a picture where the embedded thumbnail doesn’t match the photo itself. Assuming you actually want an embedded thumbnail. I guess.
‘Create > File listing…’ opens a dialog for creating text files or spreadsheets presenting the metadata from multiple images. This could be handy if you need cheat sheets of captions, perhaps to post on file sharing services with folders full of photos. Experiment to find a configuration that
works for you. I found I got the best results if I placed commas after each item that I wanted, then saved the results as a text file. I then changed the file extension on the text file from “.txt” to”.csv” and opened the file as a spreadsheet. (See illustration). The equivalent feature in Photo Mechanic is a lot friendlier.
The print dialog allows you to create metadata-annotated prints and contact sheets. Its operation is pretty obvious. You can, of course, print to PDF if you need to send someone a contact sheet, or for posting with photos on a file sharing platform, like Dropbox, that doesn’t display captions.
So there you have it. It’s not Photo Mechanic. It isn’t as polished. It wasn’t designed to be used by people in extremely stressful situations, like war zones. But XnView gets the metadata job done. It does a few things that no other program can, and is on offer at a price that leaves no excuse for not paying proper attention to metadata, whether you’re a photographer or just someone who is responsible for a website.
In future posts, we’ll be back with How-To’s on using XnView and Photo Mechanic in a website production workflow, and specifically look at how each approaches optimizing images for the best possible page load times. Please speak up in the comments. And check out our other software How-To’s, including on working with metadata in Photo Mechanic and Adobe Lightroom.