Patent Document ID: 20160321780
Application ID: 15104563
Patent Status: 0

Claim One:
1. A method for processing an image, comprising: acquiring a pair of operation control points, the pair of operation control points comprising an operation start point and an operation end point, and being used to stretch the image; calculating a vector from the operation start point to the operation end point; determining an image deforming area by using a middle point of a vector length of the vector as a center, the image deforming area covering the operation start point and the operation end point, an area that starts from a start border that is a vertical line on which the operation start point is located and extends toward a vector direction of the vector to a border of the image deforming area being a contracted sub-area, and an area that starts from the start border that is the vertical line on which the operation start point is located and extends in a direction opposite to the vector direction of the vector to another border of the image deforming area being a stretched sub-area; determining a pixel step value of each pixel in the image deforming area, a pixel step value of a pixel in the contracted sub-area being greater than a preset step value threshold, a pixel step value of a pixel in the stretched sub-area being less than the step value threshold, and an integral value of the pixel step value in the contracted sub-area being equal to an integral value of the pixel step value of the pixel in the stretched sub-area; generating an offset parameter relative to the image according to the vector direction of the vector and the pixel step value of the pixel; and performing interpolation calculation on the offset parameter, to obtain a stretched image.