1. A dither mask generation method that generates a dither mask used in halftone processing for recording an image by a recording head having a plurality of nozzles that eject ink, the method comprising: a nozzle pattern setting process of setting a nozzle pattern indicating correspondence relation between individual pixels of the dither mask and the nozzles in charge of recording of respective pixel positions; a dot priority pixel setting process of setting dot priority pixels to be candidates to which a threshold is to be set among the pixels of the dither mask, based on the nozzle pattern; a threshold setting process of setting the threshold to the pixel belonging to the dot priority pixels; a process of changing the dot priority pixels before the threshold is set to each of all the dot priority pixels that are tentatively set by the dot priority pixel setting process regarding at least one of the thresholds set in the threshold setting process, wherein, by changing the dot priority pixels before the threshold is set, graininess of the dither mask is decreased; and recording the image by the recording head having the plurality of nozzles that eject ink using the generated dither mask having decreased graininess.