name or algorithm for these transformation?

I want to write some image processing code. anyone can point out more details? thanks

http://s17.postimage.org/4gmhg28or/image.jpg

this fixs the central line and then strench the other border
http://www.freeimagehosting.net/t/c6lxa.jpg