1. An image forming apparatus that forms an image corresponding to light emitted by a light source, the image forming apparatus comprising: an image processing unit that forms image data with a first resolution and tag information indicating whether or not each of pixels of the image data is a pixel of a character or a line based on input image data; a resolution converting unit that sequentially selects target pixels from the image data with the first resolution, and converts the image data with the first resolution to image data with a second resolution higher than the first resolution for each of the target pixels; and a light source driving unit that drives the light source by a modulation signal corresponding to the image data with the second resolution, wherein the resolution converting unit includes an image matrix acquiring unit that acquires an image matrix that is image data and tag information with the first resolution in an area containing each of the target pixels and pixels around the target pixel; a pattern matching unit that determines whether or not the target pixel is a pixel of an edge of a character or a line based on a layout of the image data and the tag information in the image matrix; and a first converting unit that, when the target pixel is the pixel of the edge of the character or the line, converts the image data to image data with the second resolution of a pattern that is determined in accordance with the layout.