jnicklas/carrierwave — pull request #787 by jebw (2012-07-18 09:34:42+00:00)
Title: Fix for Issue #694

I'm not sure how to for test for this within the test suite but the changes resolved the bug in a site I've been working on, and the test suite doesn't have any new failures as a result of these changes.

Having read back through my code it makes sense to me

Old Rule
1) Find mininum scaling value
2) calculate new x & y for image
3) Call imagemagick with both x and y output sizes

This results in a rounding error and a 1 pixel white border

My Rule
1) Find min x scaling value
2) Find min y scaling value
3) Use smallest and only scale image either by height or width, not both so allowing imagemagick to calculate the other axis.