2014-07-14 30 views

回答

2

找到该使用ImageMagick库的溶液中,它可以从here下载。

一旦参照Magick.net DLL已经添加可以使用以下代码来扭曲所述图像,

double[] Points = new double[] { 
       0,0,    0,0, 
       0,500,    50,500, 
       0,1000,    0,1000, 
       420,0,    420,0, 
       420,500,   370,500, 
       420,1000,   420,1000 
      }; 
      MagickImage image = new MagickImage("E:/ImageManipulation/WebApplication2/images/Test.jpg"); 
      image.Distort(DistortMethod.Shepards,Points); 
      image.Write("E:/ImageManipulation/WebApplication2/images/Result.jpg"); 

参见here为Shepards方法的一些例子