Added a new function can change the resolution.