downsample when image is too large