Devesprit.ImageProcessor & Devesprit.ImageServer
DistortCornersEffect

Description:

This processor distorts an Image by changing the coordinates of the four corners (see figure) defined by the image's boundaries.

 

Method Declaration
Copy Code
public static ImageFactory DistortCornersEffect(this ImageFactory imageFactory, DistortCornersSettings settings)

DistortCornersSettings:

X1 Set the new upper-left corner x-coordinate.
X2 Set the new upper-right corner x-coordinate.
X3 Set the new bottom-right corner x-coordinate.
X4 Set the new bottom-left corner x-coordinate.
Y1 Set the new upper-left corner y-coordinate.
Y2 Set the new upper-right corner y-coordinate.
Y3 Set the new bottom-right corner y-coordinate.
Y4 Set the new bottom-left corner y-coordinate.

Assembly:

Devesprit.ImageProcessor.Plugins.AdvancedEffects.dll

Example
Copy Code
new ImageFactory().Load(@"My-Image-Path")
 .DistortCornersEffect(new DistortCornersSettings()
 {
   X1 = -20,
   Y1 = -20,
   X2 = 600,
   Y2 = 0,
   X3 = 650,
   Y3 = 280,
   X4 = -30,
   Y4 = 400
 }).BackgroundColor(Color.White);

Original

 

 

Result