An Improved Example-Based Texture Synthesis Algorithm