global resampling to width(*height)