New api to resize.