This webpage contains an implementation, as well as sample images and timing results of Alyosha Efros' texture synthesis algorithm, published in ICCV99.
You can find the code here . You will need to write your own image class (mainly for image IO). Take a look at README for more details.
Click here.
My implementation is based on this pseudo-code .You may also want to read the paper for more details:
``Texture Synthesis by Non-parametric Sampling'' Alexei A. Efros and Thomas K. Leung IEEE International Conference on Computer Vision (ICCV'99), Corfu, Greece, September 1999
You are free to use the code in whatever ways you like. However, if you come up with a modification/re-implementation of this code that are sufficiently faster, I would like to know about it.