1. A method of operating on an image of a document, comprising: for an electronic file comprising a representation of the document, portioning the representation of the document into non-overlapping areas, each area comprising a matrix of pixels, each pixel having an initial grayscale value and a position in the matrix; for each area, determining a black point value and a white point value; for each pixel in each area, determining a revised pixel grayscale value for the pixel using one or more selections from the group consisting of: the pixel's grayscale value; the pixel's position in the matrix; the black point value for the area comprising the pixel; the white point value for the area comprising the pixel; the black point value for at least one area adjacent to the area comprising the pixel; and the white point value for at least one area adjacent to the area comprising the pixel; and producing the image of the document using the revised grayscale values for each pixel.