Restoring image resampling