An image coding apparatus includes an approximating element having plural
different prediction techniques to approximate, 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 obtained upon processing of the pixel
preceding the target pixel; a determining element computing an error
between each of approximate values obtained by the prediction techniques
and that of the target pixel, selecting one of the prediction techniques
for the target pixel based on the computer error, and performing the
selection by preferentially referencing the rank information 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
selected prediction technique.