Considering the problem of discrete texture synthesis and the time for texturing, this paper proposes a novel framework for synthesizing texture images based on discrete example-based elements. We start with extracting texture feature distribution from exemplars and then produce discrete elements based on the cluster algorithm. After initializing a texture image, we propose a texture optimization algorithm based on heuristic searching to improve the quality of the texture image. Final, we use a texture transfer method based on Convolutional Neural Network (CNN) to stylize the optimized texture image. Our results show that the proposed texture synthesis method can significantly improve the quality of discrete texture synthesis and effectively shorten the time for texture generation. INDEX TERMS Texture synthesis, discrete elements, cluster algorithm, heuristic searching, CNN.