Fix downsampled image saving