How to display arbitrary metadata like HDR in information overlay and/or search for it?
Posted: Sat Jun 15, 2019 4:03 pm
Dear all, a relatively simple question that could be still demanding for the folks quite advanced in XnView MP...
XnView MP 0.93.1 supports a certain customization for the information overlay that can be toggled by pressing shortcut i or calling menu > view > show information. For customization of info box content, users can select from a relatively wide range of parameters, but some are missing => Is a full customization in the sense of displying arbitrary meta-data fields somehow possible? E.g. using escape sequences, in config files,...
Motivation for a full customization (so more than a pre-defined set of shipped parameters) by example: I would like to instantly see which of my files are HDRs created within the camera, because for these pics, I have to more carefully look for artifacts (ghots, half or double parts, etc are frequent). AFAIK there is no standardized meta data field for HDR info but depending on the camera model, the information may be stored in MakerNotes's metadata fields of different names, for example the Panasonic DC-TZ202 stores HDR related information in "MakerNotes:HDR" (e.g. 2 EV) and "MakerNotes:HDR Shot" (on/off), for iPhone SE it's "HDR Image Type", for Sony RX100 IV "HDR Setting" => It will be hard for Pierre to offer a build-in parameter for HDR that works for all cameras and is always up to date and also for all other possibly interesting fields (red eye removal, time lapse shot number,...) => allow the users to display any/arbitrary meta data fields.
Yes, I am aware that showing data extracted by ExifTool may be slower than with the other library (which is used for info tabs EXIF, XMP etc).
What I tried without finding a nice workaround/solution, #4 combined with #5 being OK but far from nice
Hence, I thought of a self defined XMP field - anyone knowing whether such is allowed and won't cause syntax errors or the like and how to display that in XnView MP's information overlay?
Thank you for any input. Regards, Georg
XnView MP 0.93.1 supports a certain customization for the information overlay that can be toggled by pressing shortcut i or calling menu > view > show information. For customization of info box content, users can select from a relatively wide range of parameters, but some are missing => Is a full customization in the sense of displying arbitrary meta-data fields somehow possible? E.g. using escape sequences, in config files,...
Motivation for a full customization (so more than a pre-defined set of shipped parameters) by example: I would like to instantly see which of my files are HDRs created within the camera, because for these pics, I have to more carefully look for artifacts (ghots, half or double parts, etc are frequent). AFAIK there is no standardized meta data field for HDR info but depending on the camera model, the information may be stored in MakerNotes's metadata fields of different names, for example the Panasonic DC-TZ202 stores HDR related information in "MakerNotes:HDR" (e.g. 2 EV) and "MakerNotes:HDR Shot" (on/off), for iPhone SE it's "HDR Image Type", for Sony RX100 IV "HDR Setting" => It will be hard for Pierre to offer a build-in parameter for HDR that works for all cameras and is always up to date and also for all other possibly interesting fields (red eye removal, time lapse shot number,...) => allow the users to display any/arbitrary meta data fields.
Yes, I am aware that showing data extracted by ExifTool may be slower than with the other library (which is used for info tabs EXIF, XMP etc).
What I tried without finding a nice workaround/solution, #4 combined with #5 being OK but far from nice
- Inspired by Re: Settings -> Thumbnails -> Labels: Focus Distance, I simply typed {HDR} {MakerNotes: HDR} {MakerNotes:HDR} {EXIF:MakerNotes:HDR} but all these params are not evaluated but shown as typed
- I searched the forum but only found questions but not solutions about that topic, like e.g. in Full Screen+Image details-metadata
- I tried to workaround using XnView MP's search (so creating a "vitrual folder" only containing HDR images), but sadly, XnView MP's search does only allow abitraty XMP fields but not the other metadata (as e.g. MakerNotes): menu bar > tools > search offers XMP:Field which shows 2 text boxes, one for filed name (e.g. Rating), one for field value (e.g. 2). Something similar supporting MakeNotes
- I tried to create a batch file that calls ExifTool to read the MakerNote:HDR and append it to the file name. The core call is
Works in general, is sufficiently fast, but: It's a step more in the workflow and creates redundant information. Depending on camera, filed values may contain characters that are illegal for filenames or make the name quite long, hence some intermediate processing would be required. Quite ugly to correct if executed by bad luck twice for the same images, hence, I would need a pre-processing to first check whether a file already contains the HDR info. Uploading the files often changes their names (think facebook or other cloud service provider), so I cannot access the information any more. And so on.
Code: Select all
<exiftoolpath>\exiftool.exe -ext jpg "-Filename<%f HDR ${HDR}.jpg" .
- To overcome the many limitations of the previous approach, I wanted at least the very basic HDR info (is it HDR or not?) stored as metadata within the image file in a way that XnView MP can search it as well as display it in the information overlay. I figured out how to tell ExifTool to add keyword "HDR" for HDR images; the core call is
Short explanation: += adds a entry to a list (here: value "HDR" to keywords), -if restricts processing to files that match the two and-connected conditions, one being HDR field not set to value Off (zero in ExifTool's binary representation) and the other being that the list of keywords does not yet contain an entry starting with HDR (avoids most duplicate keywords but because $ for string end cannot be used here, ^foo will also match foooo).
Code: Select all
<exiftoolpath>\exiftool -keywords+=HDR -if "$MakerNotes:HDR != 0 and not($keywords =~ /^HDR/i)" *.jpg
It works in general, is sufficiently fast (around 500 files in 20secs), causes no errors if metadata values contain special characters, produces no garbage if executed twice for the same images, when files are uploaded it's often not removed and sometimes even parsed (cloud service providers often leave file content untouched and some even parse keywords so you can search for them on the website). Still, it's a step more in the workflow and creates redundant information. New limitation: More detailed HDR infos than "yes/no" are difficult to realize, because all combinations of HDR on/off, auto or manually triggered, intenseness of HDR (e.g. 1.0 or 2.0 EV), amount of source images,... would result in a quite big amount of different keywords.

Thank you for any input. Regards, Georg