Patent ID: 8111930

Claim:
An image encoding apparatus for encoding image data, comprising: an input unit adapted to input image data for respective blocks each defined by a plurality of pixels; an extraction unit adapted to check if image data of each inputted block includes a pixel of a high frequency component, and to extract a color of that pixel as an extracted color; a generation unit adapted to generate identification information used to identify pixels having the extracted color and pixels having non-extracted colors in the block; a first encoding unit adapted to encode the generated identification information; a calculation unit adapted to calculate substitution color data used to substitute pixel data having the extracted color based on pixel data of the non-extracted colors in the block; a substitution unit adapted to substitute the pixel data having the extracted color by the substitution color data calculated by said calculation unit; a second encoding unit adapted to encode image data of the block obtained by substitution of said substitution unit; a detection unit adapted to detect a data size of encoded data generated by said first encoding unit; a data size suppression unit adapted to suppress a data size of encoded data generated by said second encoding unit based on the data size detected by said detection unit; and a combining unit adapted to combine and output information of the extracted color, the encoded data generated by said first encoding unit, and the encoded data output from said data size suppression unit, wherein at least one of the foregoing units is implemented by a processor.