Filter JPGs by megapixel size

Started by and78386, October 25, 2022, 06:19:42 AM

Previous topic - Next topic

and78386

Hi all,

Windows 10 user here. I have a big folder with many JPGs in it.

I want to move all JPGs with a megapixel size smaller than 12 megapixel to a separate folder.

How can you do that?

Cheers,
Andreas

Phil Harvey

Hi Andreas,

Try this:

exiftool -directory=DESTDIR -if "$megapixels < 12" -ext jpg SOURCEDIR

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

and78386

Works great, thank you, great tool!