A small experiment with distorting jpeg-images with Javascript in the browser.
You can test it here: https://louie.se/dumpster/misc/jpeg-distort/
And find the code here: https://github.com/the-louie/jpeg-distort
Mostly simple pixel manipulation, like scrolling and skewing, but also a function to introduce random byte-errors in the compressed jpeg-data itself to get some unpredictable but nice effects.