On the winter of 2015 I was a TA for CPSC 425, the computer vision course for undergrads at UBC. One of the assignments in the course is to implement a simplified version of the algorithm described in "Texture Synthesis by Non-parametric Sampling", by Efros and Leung from ICCV 1999 [pdf].
The live demo of the method is on http://una-dinosauria.github.io/efros-and-leung-js/. For some reason it runs way faster on Firefox compared to Chrome.
Before doing anything, go ahead and install node-js.
Now clone the project
git clone firstname.lastname@example.org:jltmtz/efros-and-leung-js.git
Install the dependencies
npm install -i ndarray
npm install -i raphael
Finally, export it with browserify to use the project in a web browser
npm install -g browserify
browserify main.js -o bundle.js
And you should be ready to go!