Image Comparison

I wanted to compare two images side by side for my articles on pixel art scaling (parts one and two), to show the difference between various algorithms.

The TwentyTwenty jQuery plugin does this beautifully, but again I wanted to avoid external dependencies. Also, I guessed this was going to be relatively straightforward using drawImage, and for once it turned out I was right.

Try dragging and dropping your own image files in there.