This is a mex-c version of the code for texture synthesis. 
To run the code, just run texture_synthesis.m file in your matlab. 

If you want to try any other texture images, you may need to change line 4-6 of texture_synthesis.m.

Original C code is provided by Dr. Xiuwen Liu.