rescale images for boxes