crop image before upload finished