Move codes to window.rb
Support fits window size for image

GitHub fixed #1 fixed #2