Modifies images, courtesy of Duncan Szarmes.