A computer-implemented method for rotating an image by 90 degrees comprising the step of: sectioning a memory area for storing image data into a plurality of square image areas; and characterized by securing image areas in the memory area which are arranged in m lines in vertical and n lines in horizontal in an initial state before rotation, the total number of image areas is m·n, and each of the image areas is defined as: from the left of the uppermost row, an image area a11, an image area a12, an image area a13, an image area a14,..., and an image area a1n; from the left of the next row below the uppermost row, an image area a21, an image area a22, an image area a23, an image area a24,..., and an image area a2n; after this, in the same way, and from the left of the lowermost row, an image area am1, an image area am2, an image area am3, an image area am4,..., and an image area amn, and a temporary storage area b1, a temporary storage area b2, a temporary area b3, a temporary area b4,..., and a temporary area bn that are arranged in one row and n columns below the lowermost row; and rotating an image in the initial state before rotation by rotating the image data in the image area a1n, the image area a2n, the image area a3n,..., and the image area amn and moving the rotated image data to the temporary storage area b2, the temporary storage area b3, the temporary storage area b4,..., and the temporary storage area bn, respectively; rotating the image data in the image area a11, the image area a12, the image area a13,..., and the image area a1 (n-1) and moving the rotated image data to the positions of the image area a1n, the image area a2n, the image area a3n,..., and the image area a(m-1)n respectively; rotating the image data in the image area a21, the image area a31, the image area a41,..., and the image area a(m-1)1 and moving the rotated image data to the positions of the image area a12, the image area a13, the image area a 14,..., and the image area a1(n-1) respectively; rotating the image data in the image area a32 and moving the rotated image data to the position of the image area a11; and rotating and moving the image data in each of the image areas to a free area in a small matrix formed with the image area a12, the image area a13, the image area. a14,..., the image area a1n, the image area a22, the image area a23, the image area a24,..., the image area a2n, the image area a32, the image area a33, the image area a34,..., the image area a3n,..., the image area am2, the image area am3, the image area am4,..., and the image area anm via the temporary storage area in order, wherein each of the image data is rotated by 90 degrees. sectioning a memory area for storing image data into a plurality of square image areas; and characterized by securing image areas in the memory area which are arranged in m lines in vertical and n lines in horizontal in an initial state before rotation, the total number of image areas is m·n, and each of the image areas is defined as: from the left of the uppermost row, an image area a11, an image area a12, an image area a13, an image area a14,..., and an image area a1n; from the left of the next row below the uppermost row, an image area a21, an image area a22, an image area a23, an image area a24,..., and an image area a2n; after this, in the same way, and from the left of the lowermost row, an image area am1, an image area am2, an image area am3, an image area am4,..., and an image area amn, and a temporary storage area b1, a temporary storage area b2, a temporary area b3, a temporary area b4,..., and a temporary area bn that are arranged in one row and n columns below the lowermost row; and rotating an image in the initial state before rotation by rotating the image data in the image area a1n, the image area a2n, the image area a3n,..., and the image area amn and moving the rotated image data to the temporary storage area b2, the temporary storage area b3, the temporary storage area b4,..., and the temporary storage area bn, respectively; rotating the image data in the image area a11, the image area a12, the image area a13,..., and the image area a1 (n-1) and moving the rotated image data to the positions of the image area a1n, the image area a2n, the image area a3n,..., and the image area a(m-1)n respectively; rotating the image data in the image area a21, the image area a31, the image area a41,..., and the image area a(m-1)1 and moving the rotated image data to the positions of the image area a12, the image area a13, the image area a 14,..., and the image area a1(n-1) respectively; rotating the image data in the image area a32 and moving the rotated image data to the position of the image area a11; and rotating and moving the image data in each of the image areas to a free area in a small matrix formed with the image area a12, the image area a13, the image area. a14,..., the image area a1n, the image area a22, the image area a23, the image area a24,..., the image area a2n, the image area a32, the image area a33, the image area a34,..., the image area a3n,..., the image area am2, the image area am3, the image area am4,..., and the image area anm via the temporary storage area in order, wherein each of the image data is rotated by 90 degrees.