Fit big images to browser window

This pull-request fixes a bug when pictures are to big to fit to a browser's window