A non-transitory computer readable storage medium storing a program for causing a computer to function as an image processing apparatus for generating a screen image, wherein the image processing apparatus comprises:
- (A) a dither processing unit configured to perform dither processing on first image data to generate second image data, the generated second image data including a target pixel and an adjacent pixel, each of the target pixel and the adjacent pixel having a density value, the density value of the target pixel being greater than that of the adjacent pixel, and the density value of the adjacent pixel being not greater than a predetermined density
- (B) a diffusing unit configured (a) to determine an error value resulting at the target pixel, the error value being based on a difference between (i) a light amount of laser light emitted on the basis of a pixel value of the target pixel, and (ii) a target light amount corresponding to the density value, with respect to the target pixel, and (b) to diffuse the error value to pixels subsequent to the target pixel, the adjacent pixel being included in the pixels subsequent to the target pixel, wherein the diffusing unit is configured not to diffuse an error value resulting at the adjacent pixel to pixels subsequent to the adjacent pixel;
- and
- (C) an obtaining unit configured to obtain (a) a pulse width of the target pixel, and (b) a pulse width of the adjacent pixel based on (i) the density value of the adjacent pixel and (ii) an error value diffused by the adjacent pixel,
- wherein the pulse width of the target pixel and the pulse width of the adjacent pixel are used to generate signals to output the screen image.