#!/usr/bin/env python 
import os
from PIL import Image

path = './'

files = []
# r=root, d=directories, f = files
for r, d, f in os.walk(path):
    for file in f:
        if '.jpg' in file:

            im=Image.open(os.path.join(r, file))
            height, width = im.size
            print(file + " : " + str(width)+ "x"+ str(height))
