Added the affine transformation to autocrop.