Perspective Image Distortion

前端 未结 5 1186
旧时难觅i
旧时难觅i 2021-01-14 02:17

The application I am working on currently requires functionality for Perspective Image Distortion. Basically what I want to do is to allow users to load an image into the ap

5条回答
  •  隐瞒了意图╮
    2021-01-14 03:15

    YLScsFreeTransform doesn't work as expected. Way better solution is ImageMagic

    Here is how you use it in c#:

    using(MagickImage image = new MagickImage("test.jpg"))
    {
        image.Distort(DistortMethod.Perspective, new double[] { x0,y0, newX0,newY0, x1,y1,newX1,newY1, x2,y2,newX2,newY2, x3,y3,newX3,newY3 });
        control.Image = image.ToBitmap();
    }
    

提交回复
热议问题