scale down before saving image