With the development of multimedia technology, the rapidly increasing usage of large image database becomes possible. To carry out its management and retrieval, Content-Based Image Retrieval (CBIR) is an effective method. This paper realizes a CBIR system by extracting the spatial texture features and its algorithm and structure of the system are also introduced. The experiment results are given in the end.