Instagram Unshredder Challenge

A html5 canvas/javascript version of my solution to the Instagram Unshredder Challenge. Click the "Do Unshred" button for the magic.
Do Unshred
Choose another image : Load from url:
#shreds :
Load & Shred

(Notes:
- Examples 3 and 16 have a lot of shreds, it might take a while to decode (Example 16 comes from a user, thanks for that whoever you are :).
- There is a known flaw in my algorithm when the side borders are identical in the original image it might have a hard time setting things in the right position. See examples 10, 11, 12 and 13 in the drop down.
- For instances where large portions of identical color or repeating patterns occur, it might have a hard time setting things straight. Although a human might have a hard time with some of these, but not always. See examples 14 and 15.
- Please don't try to break things, also, the image loaded from the url is resized to max 640px wide and to a multiple of the shred count you have entered (with a minimum shred width of 6).
- If the "Load" doesn't work, try reloading the page or changing the url.)

from poudro.com