Greater than, less than operators in searches?

Post Reply
SteveB411
Posts: 2
Joined: 30 Jan 16 0:02

Greater than, less than operators in searches?

Post by SteveB411 » 30 Jan 16 0:18

I am using the trial version of Photo Supreme Server Edition. I was going to submit a feature request, but I want to make sure I'm not missing something here. Based on looking at the software and reading forum posts, there doesn't appear to be any way to use Boolean "greater than" or "less than" operators in searches. This is important to me -- I was ready to pay for the software until I ran into this.

I have images of varying resolutions, and the ability to search based on pixel height or width is important. But I need to search for ranges of height or width, not specific values.

For example, suppose I wanted to search for images where either the height or width is equal to or greater than 1920 pixels. Something like %imageheight >= 1920 OR %imagewidth >= 1920.

Is this possible? I'm sort of dumbfounded that database software that otherwise seems pretty powerful can't do a search like this. But maybe I'm just missing a way to do it.

vlad
Posts: 895
Joined: 01 Sep 08 15:20

Re: Greater than, less than operators in searches?

Post by vlad » 30 Jan 16 11:06

Hello Steve, welcome to the forum!

I'm sorry to say, but there's no easy way to search for value ranges, afaik. I have a couple of tips, however:

1) Browse Catalog -> By Image Details, you might see the various image sizes there. (Sorry, I can't check right now.)
2) You can filter images by macro commands (which are very powerful and likely include the image dimensions) - look inside the Filters dropdown.
3) You (or someone else) could write a custom scipt for searching or filtering images based on value ranges.
4) You could always submit feature requests to Mantis.

I hope that helps and you stick with Photo Supreme.

SteveB411
Posts: 2
Joined: 30 Jan 16 0:02

Re: Greater than, less than operators in searches?

Post by SteveB411 » 30 Jan 16 19:56

Thank you. Otherwise I like the software, and so I'll try to figure out a workaround. It may involve finding another app that can add keywords to images based on ranges. I will also submit a feature request.

acertain
Posts: 45
Joined: 06 Jan 16 6:35

Re: Greater than, less than operators in searches?

Post by acertain » 01 Feb 16 16:30

Seems like that script already exists: http://scripts.idimager.com/cgi-bin/idi ... aeb27e3ac3

If it doesn't do what you want and you don't know how to make it do that, let me know.

Andrew

Mike Buckley
Posts: 1194
Joined: 10 Jul 08 14:18

Re: Greater than, less than operators in searches?

Post by Mike Buckley » 01 Feb 16 17:28

Be sure to test that script in an isolated environment, as it was made for the predecessor of Photo Supreme.

acertain
Posts: 45
Joined: 06 Jan 16 6:35

Re: Greater than, less than operators in searches?

Post by acertain » 01 Feb 16 20:44

OK. When I get home tonight I'll give it a shot and try to update it if needed.

sanphotgn
Posts: 310
Joined: 26 Aug 07 18:06

Re: Greater than, less than operators in searches?

Post by sanphotgn » 02 Feb 16 1:18

Many of the scripts in the Repository are in the .idscript file extension. PSU appears to want the .psc file extension. How does one convert one to the other? I tried changing the extension and my text editor still wasn't happy with the file. Or does one open the .idscript file in the Scripter and all is well, except for the fact it may not work because the script was designed for IDI? Thanks.
Photo Supreme 4.3.4.2141 (64 bits) (Windows)

vlad
Posts: 895
Joined: 01 Sep 08 15:20

Re: Greater than, less than operators in searches?

Post by vlad » 02 Feb 16 2:48

Afaik, Hert has clearly stated (more than once) that older (IDi) scripts are not meant for Photo Supreme. I don't see any point in attempting to run an IDI script inside PSU. Furthermore, I don't think there's any standard way to migrate a script.

(FWIW, some of the older scripts are now completely obsolete: the correponding functions have been deployed as standard PSU functionality. 'Granted, that's not much comfort when someone's interested in an old script that would still make sense for Supreme.)

PhilBurton
Posts: 307
Joined: 12 Sep 10 18:47
Location: CA, USA

Re: Greater than, less than operators in searches?

Post by PhilBurton » 02 Feb 16 3:40

sanphotgn wrote:Many of the scripts in the Repository are in the .idscript file extension. PSU appears to want the .psc file extension. How does one convert one to the other? I tried changing the extension and my text editor still wasn't happy with the file. Or does one open the .idscript file in the Scripter and all is well, except for the fact it may not work because the script was designed for IDI? Thanks.
It has been discussed elsewhere that better documentation is needed for scripting.

Phil
Photo Supreme user
Home built i7 3930, 32 GB RAM, Win 10 Pro 64, latest version of Photo Supreme 3, Lightroom 6 and Photoshop CS 6 (perpetual licenses)

acertain
Posts: 45
Joined: 06 Jan 16 6:35

Re: Greater than, less than operators in searches?

Post by acertain » 02 Feb 16 18:12

Unfortunately, I didn't have a chance to get to this last night. It shouldn't be very hard - the one thing I don't know how to do is get user input for filter scripts (e.g. to get the dimension and search values). I'll try to poke around some tonight. If anybody has any pointers on getting input, that would be great. I couldn't find any examples of filter scripts for PSU that take input.

Andrew

sanphotgn
Posts: 310
Joined: 26 Aug 07 18:06

Re: Greater than, less than operators in searches?

Post by sanphotgn » 02 Feb 16 19:45

acertain wrote:I couldn't find any examples of filter scripts for PSU that take input.
PSU comes with "Filter By Macro Command.psc" located here: C:\Program Files\IDimager Products\Photo Supreme x64\Resources\Scripts\FilterScripts.

I think you will find the file has everything you need. Figuring out what needs to be done will probably take you 10 minutes. I won't tell you how long it took me. Unfortunately, trying to figure this stuff out is not easy for me.

I was able to modify the file to do what you want to do ... but, when pointed at certain fields (I didn't remove the selector feature) and maybe because I don't know what I am doing, the process would sometimes crash the database. (Warning: the database may crash so hard, you will see multiple error screens, you will have to kill the process by hand, when you re-open the database it won't open; and so on ... so you need a backup. Best to practice on a test database.) I have to figure out how to exit out of the compare if certain fields are chosen.

Some fields appear to contain only a numeric value, but obviously something else is going on and when applying greater or lesser than, the results aren't accurate or the database crashes. For example this field: ISO Speed Ratings. It appears to be only numeric in the Details Panel, but may actually contain non-numeric characters (in some cases). Also the field has an arrow next to it in the Details Panel. The XMP is shown as:

<exif:ISOSpeedRatings>
<rdf:Seq>
<rdf:li>2500</rdf:li>
</rdf:Seq>
</exif:ISOSpeedRatings>

Compare with:

exif:PixelXDimension="4896"


Granted one could hard wire the field(s) and avoid choosing fields that don't work. I haven't figured that out yet.
Photo Supreme 4.3.4.2141 (64 bits) (Windows)

acertain
Posts: 45
Joined: 06 Jan 16 6:35

Re: Greater than, less than operators in searches?

Post by acertain » 02 Feb 16 20:07

Thanks. I'll check that out. I haven't done anything with macros, so I didn't bother to look at it!

Andrew

sanphotgn
Posts: 310
Joined: 26 Aug 07 18:06

Re: Greater than, less than operators in searches?

Post by sanphotgn » 02 Feb 16 22:02

If you haven't used the Filter By Macro Command, I would recommend trying it out. I use it a lot. You can add more than one field (Macro Command). Each field can have a value. You can save your macro entries so you don't have to re-enter them.
Photo Supreme 4.3.4.2141 (64 bits) (Windows)

vlad
Posts: 895
Joined: 01 Sep 08 15:20

Re: Greater than, less than operators in searches?

Post by vlad » 02 Feb 16 22:29

Well, that was my point (in my initial reply to Steve): one can't search for value ranges across the entire catalog, but one could use macro command filters to filter based on such criteria (IIRC).

Post Reply