Rectification or geometric correction of digital images refers to the 2-dimensional resampling of an image data array onto a new grid which is distorted with respect to the original grid. When an image on a mass storage device is very much larger than the available computer central memory, it is important to choose an algorithm for rectification which minimizes data transfers (i.e., I/O time) between the mass storage device and central memory. Transposing image columns with rows allows simplification in resampling, which may then be done in two 1-dimensional operations, each along easily accessible image rows. The storage format of multichannel images, often interleaved channels-by-line, may introduce difficulties in transposition, however. A very efficient rectification algorithm is described that treats multiple channels as a third array dimension and uses a highly efficient, dimension-sorting algorithm for transposition.