ImageSharp.Drawing icon indicating copy to clipboard operation
ImageSharp.Drawing copied to clipboard

IndexOutOfRangeException in DrawLines

Open avbelkin opened this issue 6 years ago • 0 comments

After updating to ImageSharp.Drawing beta-009 and running DrawLines I've got a large number of IndexOutOfRangeException in Simplify. Surrounding code was not changed. I've used both beta and debug build from latest source code.

I've created dotnetfiddle to reproduce the problem: https://dotnetfiddle.net/6AAPHy

DrawLines can crash even with five points in line like: new []{ new PointF(85,62), new PointF(68,21), new PointF(20,74), new PointF(19,80), new PointF(37,28)};

//Thanks a lot for your work, ImageSharp & ImageSharp.Drawing are brilliant. We use ImageSharp.Drawing for rendering GPS traces from search and rescue operations in ASP.NET Core service

avbelkin avatar Jun 23 '20 10:06 avbelkin