1. An image compressing apparatus, comprising: a receiving section that receives image data representing an image; a detecting section that detects an edge region of at least one of text and line art in the image represented by the image data which is received by the receiving section, wherein the edge region is a foreground layer; a binary image data generating section that generates a binary image data based on the image data received by the receiving section, in which a pixel value representing the foreground layer is different from a pixel value representing an other region; a foreground color information generating section that generates foreground color information of the foreground layer which represents a color different from a color of the at least one of text and line art; a lossless compressing section that performs lossless compression on the binary image data generated by the binary image data generating section; a lossy compressing section that performs lossy compression on the image data received by the receiving section; and a compressed file generating section that generates a compressed file containing the binary image data on which the lossless compression has been performed by the lossless compressing section, the image data on which the lossy compression has been performed by the lossy compressing section, and the color information generated by the foreground color information generating section.