1.9.5: Minor Bug in Viewer - Info Pane

*** Please report new bugs here! ***

Moderators: helmut, xnview, Dreamer

Post Reply
nicholaelaw
Posts: 1
Joined: Tue Nov 11, 2025 9:15 am

1.9.5: Minor Bug in Viewer - Info Pane

Post by nicholaelaw »

XnView: MP 1.9.5 64 bit
OS: Windows 11 25H2 64bit

I did some custom formatting in the Info pane of View tab, encountered a minor issue regarding nested parentheses. Here's a screenshot:

屏幕截图 2025-11-11 172641.png
屏幕截图 2025-11-11 172641.png (54.6 KiB) Viewed 22 times
Look at line 3, the focal length block has an extra right parenthesis. Here's the specific part's code:

Code: Select all

<span style="background-color: darkgoldenrod;">{EXIF:Focal Length}mm((({EXIF:Focal Length 35mm})))</span>
What I'm trying to achieve: Display the focal length used, and if applicable, display the 35mm-equiv Focal Length in parentheses. I assume double parentheses make the field visible only if it's non-empty? So In short I want the block to look like 100mm when the 35mm-equiv FL field is empty, and 2.9mm(28) otherwise.

In fact, the code works when the 35mm-equiv FL field is non-empty, as shown here:

屏幕截图 2025-11-11 173805.png
屏幕截图 2025-11-11 173805.png (13.8 KiB) Viewed 22 times

I think this is caused by wrongly parsing nested parentheses. Double parens got parsing priority so the code is interpreted as

Code: Select all

((, (, {field}, )), )
where it should have been

Code: Select all

((, (, {field}, ), ))
Just some speculations, I don't know how to solve it...

I'll attach the full code here as well, in case this is caused by something else:

Code: Select all

{File Index}: {Filename}
<span style="background-color: darkcyan;">{EXIF:Date Taken [Y/m/d H:M:S]}</span> <span style="background-color: darkcyan;">{Width}×{Height}</span> <span style="background-color: darkcyan;">{Size}</span> <span style="background-color: darkcyan;">{File Type}</span> 
<span style="background-color: darkgoldenrod;">{EXIF:Focal Length}mm((({EXIF:Focal Length 35mm})))</span> <span style="background-color: darkgoldenrod;">f/{EXIF:F-Number}</span> <span style="background-color: darkgoldenrod;">{EXIF:Exposure Time}s</span> <span style="background-color: darkgoldenrod;">ISO{EXIF:ISO Value}</span> <span style="background-color: darkgoldenrod;">{EXIF:Exposure Bias}eV</span>
<span style="background-color: darkslateblue;">{EXIF:Metering Mode}</span> <span style="background-color: darkslateblue;">{EXIF:Exposure Program}</span> 
<span style="background-color: darkslategrey;">{EXIF:Model}</span> <span style="background-color: darkslategrey;">{EXIF:Lens Model}</span> 
{Zoom}%
(({Tag status})) (({Rating})) (({Color label})) 
Post Reply