It is difficult properly to perform correction processing such as white balance
adjustment and exposure compensation for all types of images. This invention provides
a way in which white balance adjustment and exposure compensation are performed
in accordance with image features by considering the arrangements of pixel values
in the highlighted and shadow areas of an image. Proper correction processing can
therefore be performed for any types of images.