views:

300

answers:

1

Background: I've got a folder full of saved desktop pictures. I'd like to put them into folders, based on their resolution - 1024x768, etc. Creating the folders on the fly is a bonus. Currently, the images are all in a folder, but some of them are in sub-folders. I can merge them by hand, if that makes things easier.

I'm using Mac OS X, but I'm not opposed to installing extra apps to accomplish this (MacPorts?), or even using another OS (I've got Windows XP, Windows Vista, and Ubuntu 9 setup right now within VMWare).

Any help would be appreciated! Thank you!

+2  A: 

If you speak Python, the Python Imaging Library should do the trick.

import Image, os
for filename in os.listdir("/path/to/images"):
    image = Image.open(filename)

and from there, you can sort your images based on the size member, which is a (width, height) tuple.

Meredith L. Patterson
Thank you, Meredith! I'm still a bit lost, but I think I'm going to take Antony's advice and ask on superuser.com.Many thanks for the help, though.