A non-transitory computer-readable recording medium having stored thereon an image forming program executable by a computer of an image forming apparatus, the image forming program comprising:
- a first program code for causing the computer to write at least one of the following:
- (i) image data with an output resolution and an output gradation for a print output and (ii) image data for a confirmation display based on intermediate data of each object included in print data, and store the image data in a buffer;
- a second program code for causing the computer to perform at least one of the following:
- generate the intermediate data based on comparing a resolution of a target object with the output resolution, and adjusting a resolution of the intermediate data to either the resolution of the target object or the output resolution, wherein the output resolution is defined based on a capacity of the buffer;
- and
- generate the intermediate data based on comparing a gradation of the target object with the output gradation, adjusting a gradation of the intermediate data to either the gradation of the target object or the output gradation, wherein the output gradation is defined based on the capacity of the buffer;
- a third program code, wherein based on an input of an operation signal for enabling or disabling a confirmation display, the third program code causes the computer to switch a mode to generate the image data for the confirmation display;
- a fourth program code for causing the computer to print using the image data for print output;
- and
- a fifth program code for causing the computer to display a print preview using the image data for confirmation display,
- wherein the intermediate data includes first intermediate data, second intermediate data, and third intermediate data;
- wherein the second program code causes the computer to determine whether the mode is enabled or disabled, whether or not the resolution of the target object is higher than the output resolution, and whether or not an amount of the image data can be reduced by adjusting the gradation of the target object to the output gradation;
- wherein if (i) the mode is enabled and (ii) the resolution of the target object is higher than the output resolution, the second program code further causes the computer to generate the first intermediate data by adjusting the resolution to the output resolution while maintaining the gradation at the gradation of the target object;
- wherein when generating the intermediate data corresponding to the output gradation and the output resolution, if the amount of the image data can be reduced by adjusting the gradation of the target object to the output gradation, and in a case where either:
- (i) the mode is disabled or (ii) the mode is enabled and the resolution of the target object is not higher than the output resolution, the second program code further causes the computer to generate the second intermediate data by adjusting the resolution to the output resolution and adjusting the gradation to the output gradation;
- wherein when generating the intermediate data corresponding to the output gradation and the output resolution, if the amount of the image data cannot be reduced by adjusting the gradation of the target object to the output gradation, and in a case where either:
- (i) the mode is disabled or (ii) the mode is enabled and the resolution of the target object is not higher than the output resolution, the second program code further causes the computer to generate the third intermediate data by maintaining the resolution at the resolution of the target object and the gradation at the gradation of the target object;
- and
- wherein the first program code further causes the computer to:
- write, based on the intermediate data that includes at least one of the first intermediate data, the second intermediate data, and the third intermediate data, the image data for the print output with the output resolution and the output gradation at a time of printing;
- and
- write, based on each of the intermediate data that includes at least one of the first intermediate data, the second intermediate data, and the third intermediate data, the image data that matches a resolution used by the confirmation display while maintaining the gradation at the gradation of the intermediate data.