image resize improvements