An image forming apparatus, comprising an image carrying member configured to carry a toner image while rotating; a transfer section configured to transfer the toner image from the image carrying member to a transfer sheet; a registration roller configured to convey the transfer sheet to the transfer section by matching timing with the movement of the toner image; a transfer attitude correcting section configured to correct a transfer attitude of the transfer sheet to receive the toner image and for conveying the corrected transfer sheet to the transfer section with a timing to match with the movement of the toner image, the transfer attitude correcting section comprising: a roller unit including a base board rotatable around a center of rotation and the registration roller mounted on the base board, the roller unit further including a rotating mechanism to rotate the base board, a driving mechanism (M1, G2, G3) configured to drive the registration roller, and a shifting mechanism (M3, G3) for shifting the registration roller in a direction perpendicular to a conveying direction for the transfer sheet; a detecting section configured to detect a position of the transfer sheet being conveyed by the registration roller by detecting a first point and a second point located on a side of the transfer sheet in the conveying direction with a predetermined time interval, Δt, between the detection of the first point and the second point, wherein the registration roller is adapted to change the conveying speed into plural different conveying speeds depending on the size of the transfer sheet, and wherein the detecting section is configured to change the time interval Δt in accordance with the conveying speed so as to make the distance between the first and second points to be constant regardless of the conveying speed; and a control section configured to calculate an amount of the skew of the transfer sheet based on detection data of the first and second points and to control the roller unit based on the amount of the skew so as to correct a skew of the transfer sheet by rotating the base board and to correct a deviation of a transfer position of the transfer sheet by shifting the registration roller on the base board and for controlling the registration roller to send the corrected transfer sheet to the transfer section with a timing to match with the movement of the toner image being carried by the image carrying member. a roller unit including a base board rotatable around a center of rotation and the registration roller mounted on the base board, the roller unit further including a rotating mechanism to rotate the base board, a driving mechanism (M1, G2, G3) configured to drive the registration roller, and a shifting mechanism (M3, G3) for shifting the registration roller in a direction perpendicular to a conveying direction for the transfer sheet; a detecting section configured to detect a position of the transfer sheet being conveyed by the registration roller by detecting a first point and a second point located on a side of the transfer sheet in the conveying direction with a predetermined time interval, Δt, between the detection of the first point and the second point, wherein the registration roller is adapted to change the conveying speed into plural different conveying speeds depending on the size of the transfer sheet, and wherein the detecting section is configured to change the time interval Δt in accordance with the conveying speed so as to make the distance between the first and second points to be constant regardless of the conveying speed; and a control section configured to calculate an amount of the skew of the transfer sheet based on detection data of the first and second points and to control the roller unit based on the amount of the skew so as to correct a skew of the transfer sheet by rotating the base board and to correct a deviation of a transfer position of the transfer sheet by shifting the registration roller on the base board and for controlling the registration roller to send the corrected transfer sheet to the transfer section with a timing to match with the movement of the toner image being carried by the image carrying member.