1. An image forming apparatus comprising: an image process control unit configured to process an image data and to generate a control signal; and a drive pattern generation unit configured to generate a drive pattern to drive a recording head, based on the control signal; the drive pattern generation unit generating at least a first drive pattern and a second drive pattern which is different from the first drive pattern; the drive pattern generation unit setting a reference potential of the second drive pattern as a target reference potential and applying a pattern end of the first drive pattern to one of a pull-up pattern and a pull-down pattern operation before the second drive pattern is performed, wherein the drive pattern generation unit generates one of the pull-up pattern and the pull-down pattern based on a slope value obtained by comparing the target reference potential and a potential at the pattern end.