Actually he was really asking for a perspective projection,
which you can't do properly with a linear interpolation.
I'd be surprised to find this in any 2D graphics library,
as it really belongs to the world of 3D.
Yep, that was the application I was wishing to use it for, but it could be used in other fields. Anyway, a stretch that only works in two directions makes no sense.