2014-07-14 36 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方法的一些例子