An image processing apparatus for encoding an image which contains a region to
be encoded to have higher image quality than the surrounding portions, has detection
means (100) for detecting a quantization step from a bitstream of the image
encoded in a first stage, quantization step control means (103) for controlling
the detected quantization step, and selection means (102) for encoding the
image in a second stage using the controlled quantization step, and selecting one
of the images encoded in the first and second stages.