1. An image processing apparatus, comprising: an area extracting unit configured to extract a halftone dot area and character images in an image; a table image detecting unit configured to detect the extracted halftone dot area as a table image if (a) the extracted halftone dot area includes no ruled lines and (b1) at least two of the detected character images are arranged in a primary scanning direction or a secondary scanning direction in the halftone dot area and (b2) character alignment of a tabular layout is detected on the character images on the basis of positional relations between divisional areas into which the halftone dot area is equally divided and the character images; a compression processing unit configured to identify other parts than the detected table image and the character images as a background image, and independently compress the detected table image, the character images and the background image in a predetermined coding method; and a file generating unit configured to generate a file that includes the compressed table image, the compressed character images and the compressed background image in respective layers.