# coding: utf8  
from PIL import Image  

img = Image.open("img.jpg")  
print img.size
print img.format