Hi, Support:
I want to know whether the api support crop an image with rotated angle?
for example, how to draw the crop zone with rotated angle and saved to file with revised rotated back.
1234.jpg (67.9 KB)
and the expected result would be as below shown:
1234.png (59.0 KB)
Hello, @ducaisoft ,
you can use this code example:
void RotateAndCrop(string inputPath, string outputPath, int angle, int x, int y, int width, int height)
{
using var image = Image.Load(inputPath) as RasterImage;
image.Rotate(angle);
image.Crop(new Rectangle(x, y, width, height));
image.Save(outputPath);
}