Aspect Ratio (A Global Filter)

Started by Darius1968, July 16, 2016, 02:19:32 AM

Previous topic - Next topic

Darius1968

In my database are some scanned driver's license photo IDs, with dimensions 3.370 × 2.125 in (85.60 × 53.98 mm).  Since I don't know where on my storage they are (all over the place!), I thought to filter by aspect ratio.  Can someone here please advise/guide me on this?  It seems that all tags and/or variables don't yield a value of 1.5859.  So, how can I compute this? 

Mario

Have you tried the Orientation & Dimension filter?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Darius1968

#2
Yeah, I had a look at that, and the closest it comes to giving images of driver's license dimensions is with the aspect ratio set on 3:2, which is 1.5, but I'm seeking a way to be more precise.  How can I set this filter to return images that have an aspect ratio of 1.5859? 
Furthermore, I realize that filtering for images of ratio 3:2 might indeed include my driver's license files in the result set, but they might be among 100,000 other files.  So, I have to make the range of consideration be much more narrow, so that the center point is around 1.5859, with a narrow range of values to the left and to the right.  How can I do this? 

Mario

If neither the Orientation & Dimension filter works, and you are, as per your initial posting, also unable to find a metadata tag that holds the dimensions you're looking for, you're at a loss. If the image dimensions are not in the metadata, IMatch will be unable to find the files. But ExifTool usually fills the image width and height during import.

Did you check one of the files in the Metadata Panel using the `'Browser' layout? If the image dimensions are visible there, filter for the tag.

If this is not possible create a data-driven category based on the the {File.Width} or {File.Height} variable, like

Quote{File.Width|cast:int}

Make sure that you specify a proper filter to get only the files you really want in that category.

And, as always with such rather special requirements, a custom script would do the job pretty nicely.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

I think the script I wrote (and posted) to overcome this problem will help you.
Filter files with aspect ratio (width/height) between two specified values.
Topic 4593

Darius1968

Ubacher, I was actually gonna thank you for wtiting that script, which thus far, seems to be "just what the doctor ordered!"  Thanks!