how to distort a texture

I want to import an image as a resource. Distort the image and texturing to a square when game running.
the distorting function must be defined by myself, not cylindrical or something simple.

how to import my function?

uhm… what?

I’m thinking the same thing. You’ve got to be more clear; What kind of ‘distort’ are you trying to achieve?