Implement resolution auto-scaling, fixes issue #7

This code only auto-scales the width ratio. It scales the height ratio
by the same value. This is just a trade off that has to be made
because of the existence of multiple aspect ratios.