Since the variable length coding, such as the Huffman coding, reduces the amount of code data representing the image data by utilizing a nonuniformity of the histogram of the generated code data, a change in the quantization step corresponds to a change in the generation probability of the quantization values.