fixed too large allocation of downsampled image arrays