new interface for resample image