IF EXIST and other basic logical functions

Ideas for improvements and requests for new features in XnView Classic

Moderators: XnTriq, xnview

kubasasasa
Posts: 13
Joined: Sun Jan 27, 2008 9:44 pm
Location: Poland

IF EXIST and other basic logical functions

Post by kubasasasa »

Image

It would be nice if you could add a feature of basic logical functions within xnview.

For instance: I like to see basic photo exposure parameters while watching photos full-screen (image above) so I created such an information scheme to be shown with a picture.
The problem starts when one of the EXIF values is missing. In this case often <Focal Length 35mm> is just not there. Therefore - I don't want to see the rest of description: "mm [@35mmm]" either...

I'd love to see something like this possible:

IFEXISTS <Focal Length 35mm> THEN "<br>l= <Focal Length 35mm> mm [@35mm]" ELSE ""

and other:

IF something1 >= something2 AND/OR/XOR/NOT something3 = "sometext" THEN do_something ELSE do_something_else
obelisk
Posts: 432
Joined: Fri Jan 09, 2009 9:54 am

Re: IF EXIST and other basic logical functions

Post by obelisk »

way too complex for a viewer.
I'd rather time was spent on other features

an easier option may be just to compact empty lines
User avatar
JohnFredC
XnThusiast
Posts: 2010
Joined: Wed Mar 17, 2004 8:33 pm
Location: Sarasota Florida

Re: IF EXIST and other basic logical functions

Post by JohnFredC »

For the thumb labels and tooltips, you can use double parentheses - "((" and "))" - to hide the values for which XnView can find no data.

For instance, in the following image observe how one of the thumbs shows exposure data in the label and the other one does not:

Image

Here is the code for the last line of the label:

Code: Select all

((<Focal Length>mm)) ((f/<F-Number>)) ((<Exposure Time>s)) ((<ISO Value>iso))
Cool, huh?
John
kubasasasa
Posts: 13
Joined: Sun Jan 27, 2008 9:44 pm
Location: Poland

Re: IF EXIST and other basic logical functions

Post by kubasasasa »

Great! Now it works....
But - this functionality is a bit hidden - can you add a tooltip or a help window or just a simple label somewhere on the right - describing how double parentheses work?
Not everyone reads this forum and I believe many are interested in such feature...

Thank you very much!
User avatar
XnTriq
Moderator & Librarian
Posts: 5999
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: IF EXIST and other basic logical functions

Post by XnTriq »

User avatar
helmut
Moderator
Posts: 8453
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: IF EXIST and other basic logical functions

Post by helmut »

Really a cool feature. Haven't heard about this one before. :-O