A method and system for correcting the inclination of a scanned document
in which two integers "a" and "b" are input to perform a rotation
process. Each time an x-coordinate of a target pixel of a rotated image
is changed by one pixel, "a" is added to a factor "kwy". When "kwy"
becomes more than or equal to "b", "b" is subtracted from "kwy", and a
y-coordinate of a corresponding target pixel of an original image is
changed by one pixel. Each time a y-coordinate of the target pixel is
changed by one pixel, "a" is added to a factor "kwx". When "kwx" becomes
more than or equal to "b", "b" is subtracted from "kwx", and an
x-coordinate of the corresponding target pixel of the original image is
changed by one pixel. Four pixels including the corresponding target
pixel are used to acquire a pixel value of the target pixel by
two-dimensional interpolation by ratios acquired by dividing "kwx" and
"kwy" respectively by "b".