1. An image-comparing apparatus for comparing a code stream obtained by encoding a retrieved image, with a specific image, to determine whether the code stream is substantially identical to the specific image, the apparatus comprising: image-characteristic amount extracting means for analyzing the code stream to extract a zero-bit-plane number of each code block from the code stream; encoding-parameter extracting means for extracting an encoding parameter from the code stream; encoded-data generating means for performing wavelet transform and quantization on the specific image on a basis of the encoding parameter and then dividing a quantization coefficient into code blocks, to generate a zero-bit-plane number for each code block; and comparing means for comparing the zero-bit-plane number of each code block of the code stream with the zero-bit-plane number of that code block of the specific image, which is at the same position as the code block of the code stream, and determines, from results of comparison, whether the code stream is substantially identical to the specific image, wherein the comparing means accumulates results of a difference between the zero-bit-plane number of each code block of the code stream and the zero-bit-plane number of each code block of the specific image, and determines the similarity of the code stream and the specific image on a basis of the differences accumulated.