Added resize code.
Added pillow dep.