1. An image processing apparatus comprising: an obtaining unit configured to obtain still image data and moving image data; a still image compressing unit configured to compress the still image data; a moving image compressing unit configured to compress the moving image data on a first divided area basis among a plurality of the first divided areas in each frame; a still image compression control unit configured to divide the still image data into second divided areas correspondingly to the first areas and compress the still image data on the second divided area basis by the still image compressing unit; and a moving image compression control unit configured to decide a compression table of the first divided area corresponding to each of the second divided areas on the basis of a compression result of the still image data of each of the second divided areas and compress the moving image data of the corresponding first divided area by the moving image compressing unit by using the decided compression table.