Nowadays, the majority of images are in JPEG and MPEG compressed formats, and JPEG2000 is considered to be the next generation of compression standard due to the highperformance of discrete wavelet transform (DWT). It is timeconsuming and occupies too much memory in conventional image retrieval ways. In order to solve these problems, we use grading retrieval techniques to implement image retrieval based on discrete cosine transform (DCT) compressed domain and DWT compressed domain. For image retrieval based on DCT domain, we use color features: color moment and color histogram, to describe content of images and propose a new dynamic color space quantization based on color distribution; For image retrieval based on DWT domain, we use texture features as two level feature vectors. The mean and standard deviation of low frequency sub-band coefficients are used as the first level retrieval. The means and standard deviations of selected high frequency sub-band coefficients are used as the second level retrieval. Furthermore, the third level retrieval is achieved by the fast wavelet histogram. Our experiment results clearly show that the two grading image retrieval algorithms work better than other algorithms: store memory is reduced and retrieval accuracy is improved. Index Terms-Content based image retrieval (CBIR), compressed domain, discrete cosine transform (DCT), discrete wavelet transform (DWT), color features, texture features