Image data of plural objects are inputted, the inputted image data are encoded
on an object basis, a priority order of code amount allocation is set for the objects,
and encoding conditions for the objects in the encoding step are controlled in
accordance with the priority order. The encoding conditions are controlled so that
a total code amount obtained by encoding the image data of the plural objects does
not exceed a predetermined code amount.