For keystone correction of the perspective distortion of an image (18) projected onto a projection surface (12), an image existing in electronic form is processed by a processing device to reverse the perspective distortion. For this purpose, the processing device, respectively rotates and shifts exactly one image line (36) at a time, respectively, while the orientation of the other image lines (40,42,46) is maintained fixed. In addition or alternately, the image lines (36,40,42,46) of the original electronic image comprise a plurality of partial sections of equal lengths which are differently stretched and / or compressed by the processing device. Subsequently, the image is newly computed under consideration of all of the image lines (36,40,42,46) and is projected onto a projection surface (12) by a projector.