It appears as though there are rounding errors that occur in certain scenarios when auto scaling the height of images during resizing. In my specific case, calling resize(300, null) on a 165x220 JPG results in an image that's 300x399 rather than 300x400.