1. An image processing device comprising: a binarizing section that generates binary image data representing a binary image from raster image data representing a raster image; a white-pixel ratio determining section that, based on the binary image data, determines a white pixel ratio for each of a plurality of lines of the binary image and a position of each of lines having a white pixel ratio equal to or greater than a predetermined first threshold among the plurality of lines of the binary image, and determines a white pixel ratio for an entirety of the binary image; and an image-type determining section that determines an image type of the raster image based on the position of each of the lines having a white pixel ratio equal to or greater than the first threshold and the white pixel ratio of the entirety of the binary image, wherein the image-type determining section determines that the raster image is a photographic image when the white pixel ratio of the entirety of the binary image is equal to or less than a predetermined second threshold, and the raster image includes a text image when the lines having a white pixel ratio equal to or greater than the first threshold appear cyclically in the binary image.