A computer-readable storage medium on which is recorded a program, which is used to operate an image compression device having a prediction unit for predicting a value of a compressing target pixel from peripheral values relative to the compressing target pixel, and quantizing prediction error between a prediction value of the prediction unit and a value of an actual pixel in a predetermined quantizing step, used to direct the image compression device to function as:
- a specific pixel level difference evaluation unit reading from a buffer holding at least one line of a level value as a sum of the prediction value corresponding to each pixel and the prediction error quantization value the level value for a first pixel as a compressed pixel immediately before the compressing target pixel to be compressed on the same line and the level value for a second pixel in the same column position as the first pixel on the line on which a compressing process is performed immediately before the line, sequentially calculating a difference value between the level values, and evaluating sameness of the difference values;
- and
- a quantization switching device outputting control information to perform the quantization in a smaller step than the quantizing step used when the difference value continuously indicates the same value as a result of evaluation by the specific pixel level difference evaluation unit.