resize photo. add a little more analysis