Resize image to window size 

I've added th functionality to resize the image according to the size of window.