Resize window to fit image on open