A non-transitory computer readable medium on which a computer program for causing a computer to perform compression process for an input image having a plurality of color components are recorded so as to be readable by said computer, said computer programs comprising:
- a first image segmentation step for causing said computer to segment said input image into a image for lossless compression to be subjected to lossless compression and a image for lossy compression to be subjected to lossy compression, based on pixel identification information indicating that respective pixels constituting said input image belong to which of a plurality of areas including a text area and a photograph area;
- a color determination step for causing said computer to determine color information that is used when said image for lossless compression is further segmented;
- a second image segmentation step for causing said computer to segment said image for lossless compression segmented at said first image segmentation step into a first image for lossless compression containing said color information determined at said color determination step and one or a plurality of second images for lossless compression excluding said first image for lossless compression;
- and
- an image compression step for causing said computer to perform respectively different compression process for each of said image for lossy compression segmented by said first image segmentation step, said first image for lossless compression and said second image for lossless compression segmented by said second image segmentation step.