resize image && preparing for fotoer