1. An image processing apparatus comprising: a hardware processor that generates electronic data by being configured to: extract multiple text areas from image data including texts; calculate a font size of a character in each text area, the each text area being extracted by the hardware processor; calculate a complexity of a character in each text area, the each text area being extracted by the hardware processor; calculate a necessary resolution for the each text area with reference to the font size calculated by the hardware processor and the complexity calculated by the hardware processor; merge text areas into a layer if a difference in the necessary resolution between the text areas is equal to or less than a specified value, the necessary resolution being calculated by the hardware processor, and that determines a necessary resolution for the layer with reference to the necessary resolutions for the text areas constituting the layer; and adjust the necessary resolutions for the text areas constituting the layer to a value identical to the necessary resolution for the layer, the necessary resolution for the layer being determined by the hardware processor; and the electronic data is used for printing by a printing device.