Radial Vector Image Processing in JavaScript

I’m a noob when it comes to image processing algorithms. But when I tried to do something in GIMP that I could not find the right button for, I decided to create an image processing algorithm myself. Maybe there is a much simpler solution to this and maybe you can do it with one click in Photoshop or GIMP, but I just could not find out how.