Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Point location = new Point();
- location.X = topleft.X;
- location.Y = topleft.Y;
- Size ze = new Size();
- ze.Height = width;
- ze.Height = height;
- Rectangle rt = new Rectangle(location, ze);
- MagickGeometry mgeomentory = new MagickGeometry(rt);
- originalImage.Crop(mgeomentory);
- List<AForge.IntPoint> corners = new List<AForge.IntPoint>();
- corners.Add(new AForge.IntPoint(topleft.X, topleft.Y));
- corners.Add(new AForge.IntPoint(topright.X, topright.Y));
- corners.Add(new AForge.IntPoint(bottomright.X, bottomright.Y));
- corners.Add(new AForge.IntPoint(bottomleft.X, bottomleft.Y));
- SimpleQuadrilateralTransformation filter = new
- SimpleQuadrilateralTransformation(corners, width, height);
- Bitmap newImage = filter.Apply(originalImage);
Add Comment
Please, Sign In to add comment