Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

m021478

macrumors 6502
Original poster
Nov 23, 2007
380
5
I am trying to do a spotlight search to find images in a particular directory that have have a specific "pixels per inch" value (popularly referred to as "DPI")...Does anyone know how this can be done using spotlight?

I am sure this can also be done using an AppleScript or an Automator action somehow, but I am specifically interested in figuring out which of the various spotlight advanced search criteria would permit me to weed out such images...

In the 'Other..." list of Spotlight advanced search criteria, I've found "Resolution Height/Width", "Pixel Height/Width", and a few others that seem like they might be a good starting point to search with, but nothing has allowed me to narrow down my searches for images that are, say for example, 72ppi or 300ppi (aka ~ 72dpi or 300dpi).

Any suggestions would be greatly appreciated... Thanks!
 
I don't know how Spotlight could do it effectively. I know that in Finder, you could set certain criteria, such as pixels in height and width, but I don't know of any that would show pixels per inch or DPI. Maybe a 3rd party Finder substitute. I've discovered quite a few shortcomings in Finder's capabilities.
 
It would appear that this is one of those shortcomings...bummer!

Anyone know of a good third party app that can do this (without requiring that I catalog and/or import all of the images to do so? Is this not something that is accessible via the file's metadata?
 
It turns out this is possible...I posted the same question on another forum and got this response...

Under "Other," select "Raw Query," then put something like this in the box:

kMDItemResolutionHeightDPI=72

Note: This is case sensitive.

There's also a kMDItemResolutionWidthDPI metadata attribute that you can query. You can even chain the two if you're looking for something peculiar:

kMDItemResolutionHeightDPI=72 && kMDItemResolutionWidthDPI=96

YEAH!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.