diff --git a/WebApp/ImageGenerator.cs b/WebApp/ImageGenerator.cs index 3d29be6..5ef919c 100644 --- a/WebApp/ImageGenerator.cs +++ b/WebApp/ImageGenerator.cs @@ -101,7 +101,7 @@ public class ImageGenerator var globalRoI = GenerateGlobalRoI(requestBody.CropOffset, requestBody.CropSize, canvasRect.Width, canvasRect.Height); - Mat canvas = new Mat(globalRoI.Width, globalRoI.Height, a1Mat.Type()); + Mat canvas = new Mat(globalRoI.Height, globalRoI.Width, a1Mat.Type()); Parallel.ForEach(matrix, item => { @@ -193,8 +193,8 @@ public class ImageGenerator private Rect GenerateInitialRectCanvas(Mat reference, int rowCount, int colCount) { - int width = reference.Rows * rowCount; - int height = reference.Cols * colCount; + int width = reference.Width * colCount; + int height = reference.Height * rowCount; return new Rect(0, 0, width, height); }