1. An image processing device that outputs a raster image to an image forming unit that forms an image at a first resolution on the basis of the raster image, comprising: a raster image generation unit that generates a raster image at a second resolution that is lower than the first resolution; a pattern storage unit that stores a layout pattern of pixels of a raster image having the second resolution in accordance with a raster image having the first resolution; a pattern matching unit that inspects pixels of the raster image having the second resolution generated by the raster image generation unit, and if there is a pixel group including a pixel and pixels surrounding the pixel that has a layout pattern identical to the layout pattern stored in the pattern storage unit, replacing the pixel with the raster image having the first resolution stored in the pattern storage unit; a line-thinning unit that performs line-thinning on the raster image having the first resolution generated by the pattern matching unit by inspecting pixels of the raster image having the first resolution, and if there is a pixel group including a pixel and pixels surrounding the pixel that satisfies a predetermined condition, replacing the pixel with a pixel of a different color, a number of pixels constituting an edge of the pixel group being equal to or greater than a number of pixels constituting an edge of a minimum unit of the raster image having the second resolution generated by the raster image generation unit; and an output unit that outputs the raster image having the first resolution subjected to line-thinning of the line-thinning unit to the image forming unit.