1. A method for processing a first image comprising: accepting a specification of a geometric transformation for application to the first image to produce a second image; determining a two-dimensional filter for application to the first image using the specification of the geometric transformation; computing, using a processor, data characterizing relationships between pixel locations in the second image and pixel locations in the first image, wherein the data includes, for a pixel location in the second image, an identifier indicating a position of the two-dimensional filter with respect to the first image; storing the data characterizing relationships between pixel locations in a data structure; computing, using a processor, pixel values of the second image by applying the two-dimensional filter to the first image, including for each of a plurality of pixels locations of the second image, computing a pixel value for the second image at said pixel location by applying the two-dimensional filter according to the data characterizing the relationships between pixel locations.