Bugfix #20: support image size smaller than screen.