Image processing, the formation of bulges

Actually there is a following task: there is an image. It is necessary to deform the image so that the square was formed by a hemisphere. To implement this will be in JS+Canvas so... I Doubt that there is a ready-made solution (although you never know) so at least tell me the algorithm to implement this?

WebGL can not use... high Canvas.
October 8th 19 at 03:13
1 answer
October 8th 19 at 03:15
Wanted to explain algorithm on fingers, but came to the conclusion that it is easier to write an example:
Look, if something is not clear in the PM. The algorithm is clumsy, no anti aliasing and optimizations.
Thank you very much, I will understand. - Allene_Crona78 commented on October 8th 19 at 03:18
I just wanted to make a pincushion distortion, and I couldn't — I think I will. Thank you very much! - Sim_Volkm commented on October 8th 19 at 03:21
Simply here it is possible to embed the bilinear antialiasing (the original image is actually a texture) - emmitt_Kohl commented on October 8th 19 at 03:24

Find more questions by tags CanvasJavaScript