How to realize an elastic dragable image?

when we are draging an image, basically we can just use im.draw(mouseX, mouseY). however, the effect is too rigid. i want to realize some kind of elastic dragable image. for example, when we drag an image on the upper left corner and moves towards upper left direction, i hope that the image will deform when it is moving. one solution comes to my mind is, we calculate the new position of the image’s four corners and use homography transformation to warp it. another solution is, to setup some spring constraint between each corner and the drag point. maybe ofxbox2d can do this work? does anybody have suggestions about this problem? thanks!