1. An image processing apparatus comprising: an input unit for inputting an image; a transform unit for performing a two-dimensional discrete wavelet transform on the image to generate a plurality of frequency components; and an entropy encoding unit for performing entropy encoding on each of the frequency components in M×N-sized units, where M and N each represent an integer equal to or greater than 1. wherein, in a first encoding mode, the transform unit performs the two-dimensional discrete wavelet transform on the image a predetermined number of times or for a number of times which allows a lowest frequency component (LL) to have a size of M×N, and in a second encoding mode, the transform unit performs the two-dimensional discrete wavelet transform on the image the predetermined number of times.