The leading-end line calculating process RA4 will be described in the following paragraphs with reference to FIG. 11. As the leading-end line calculating process RA4 starts, in RF1, the CPU 40 appoints objective edges as an objective edge group TEG In particular, if no objective edge group TEG is appointed yet, the CPU 40 may appoint all of the main-scanning positions MDP and the edge positions EP, which are in the range along the conveying direction FD between the most upstream line and the 500th line, and in a range along the main-scanning direction MD between the most upstream leading-end position UHP and a pixel position apart downstream from the most upstream leading-end position UHP for a distance equivalent to a predetermined quantity of pixels, e.g., 11 pixels, as the objective edge group TEG If the objective edge group TEG is appointed already, the CPU 40 may appoint all of the main-scanning positions MDP and the edge positions EP among the pixel positions included in the range along the conveying direction FD between the most upstream line and the 500th line, and in a range along the main-scanning direction MD between a most downstream pixel position among the pixel positions included in the currently appointed objective edge group TEG and a pixel position apart downstream from the most downstream pixel position in the main-scanning direction MD for a distance equivalent to the predetermined quantity, e.g., 11, of pixels, as a new objective edge group TEG. The predetermined quantity of pixels, which defines the range of the objective edge group TEG along the main-scanning direction MD, should be an odd number approximate to 10, which may be 11. Therefore, within the range along the conveying direction FD between the most upstream line and the 500th line and in the range along the main-scanning direction MD within the distance equivalent to 11 pixels, 11 pixel positions, i.e., 11 main-scanning positions MDP and 11 edge positions EP, are appointed as the objective edge group TEG