How to slide a vertex with UV to avoid stretching?
I'm not sure about programming it in, but here is how I would do it.
After importing the image go ahead and put in your loop cuts or whatever where you want to crop the image to.

This distorts the image. To fix that, just re-unwrap it.
The command is bpy.ops.uv.unwrap()
Or you can hit W > Unwrap.

Then just delete the outside vertices and you will get a cropped image.