1

In .NET how can I transform an image into a trapezoid. The Matrix class supports rotation, shear, etc, but I can't see a trapezoidal transformation.

I'm using the usual System.Drawing.* API, but I'm flexible to other .NET solutions.

Andrew Davey
  • 5,441
  • 3
  • 43
  • 57

2 Answers2

2

I just found this: http://www.vcskicks.com/image-distortion.html

It works great

Andrew Davey
  • 5,441
  • 3
  • 43
  • 57
1

You need a projective transformation which can be represented by a 3x3 matrix. I've explained how to obtain this transformation matrix in great detail in this SO solution.

Community
  • 1
  • 1
Jacob
  • 34,255
  • 14
  • 110
  • 165