Fix perspective distortion using ImageMagick, Python and a modern browser