Moved resize code to it's own function.
Added a command line option to resize to max 800x600.