Changed the algorithm to be more efficient with the resizing.

The old algorithm would scale up the image very large and then crop it
this crops first than resizes
Merge branch 'develop' of github.com:ericmoritz/boxmath into develop