Add overflow parameter to control how to resize image

Ref #10 .