import os

all = os.listdir ('.')

wh = {}

for file in all:
	if not file.endswith ('.gif'):
		continue
	f = os.popen ("file " + file).read().split()
	w = int (f[-3])
	h = int (f[-1])
	wh [file[:-4]] = ("gif", w, h)
print wh

