1. An image coding apparatus comprising: an approximating element which has plural different prediction techniques to approximate, in input image data, a value of a target pixel to be coded with reference to values of peripheral pixels surrounding the target pixel; a holding element which holds information about ranks of the prediction techniques, the ranks being obtained upon processing of the pixel preceding the target pixel; a determining element which computes an error between each of approximate values obtained by the plural prediction techniques and the value of the target pixel, and which selects one of the prediction techniques for the target pixel based on the computed error, the determining element performing the selection by preferentially referencing the rank information held in the holding element if the error is within a predetermined tolerance; and a coding element which codes the value of the target pixel using the approximate value obtained by the prediction technique selected by the determining element.