resize to a given resolution