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 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.

Image on the left Image on the right

Try dragging and dropping your own image files in there.

Check out the code:

Posted on by Daniel Perez Alvarez. Got any comments or suggestions? Send me a tweet or an email.