Changed scale-down to resample rather than average.