Patent ID: 8218884

Claim:
An image compression apparatus comprising: a dividing section for dividing an image to be compressed into blocks, each of which has a predetermined number of pixels having respective gradation values; a determining section for determining whether the block is a first kind block, in which a number of kinds of gradation values of the predetermined number of pixels belonging to the block is not greater than N (where N is an integer which is equal to 2 or greater) for each block divided and obtained by the dividing section; and a normalizing section which generates, in a case where a determination result regarding a block for each block being divided and obtained in the dividing section is a first kind block, a first kind compressed data having a first header section having a header, in which the gradation values of the predetermined number of pixels belonging to the divided block is arranged for each kind of the gradation values in either of an ascending order or a descending order, which has been determined in advance, and code data for showing which gradation value of the gradation values arranged in the header a gradation value of the pixel coincides with in respect to the gradation value of each pixel in the block is arranged thereafter, and in cases where a determination result of the determining section is not the first kind block, the normalizing section obtains a maximum value and a minimum value of the number of gradation values of the predetermined number of pixels belonging to the block and generates a second kind of compressed data having a header section in which the minimum value and the minimum value are arranged in an order, which is contrary to the either of an ascending order or a descending order, and code data for showing to which area in M areas (where M is an integer which is greater than N), into which a distribution range having the maximum value and the minimum value as both end value has been divided, the pixel belongs is arranged.