Fix the vertical pad/trim in resampling

Turns out the top of an image *is* the high end of the axis.