Dynamically resize the image to fit the window.