You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FillRegionProcessor.OnFrameApply IndexOutOfRangeException when calling DrawLines with specific parameters #928
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using SixLabors.Fonts;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using SixLabors.ImageSharp.Processing.Drawing;
using SixLabors.ImageSharp.Processing.Overlays;
using SixLabors.ImageSharp.Processing.Text;
using SixLabors.Primitives;
using SixLabors.Shapes;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
DrawLinesBug(@"D:\support\ImageSharp\DrawLinesBug.png", new RectangleF(0, 0, 2000, 2000));
Console.WriteLine("Hello World!");
Console.ReadLine();
}
public static void DrawLinesBug(string savePath, RectangleF rectText) {
using (Image<Rgba32> img = new Image<Rgba32>((int)rectText.Width, (int)rectText.Height)) {
img.Mutate(x => x.Fill(Rgba32.Transparent));
img.Mutate(ctx => {
ctx.DrawLines(
Rgba32.Red,
0.984252f,
new PointF(104.762581f, 1074.99365f),
new PointF(104.758667f, 1075.01721f),
new PointF(104.757675f, 1075.04114f),
new PointF(104.759628f, 1075.065f),
new PointF(104.764488f, 1075.08838f),
new PointF(104.772186f, 1075.111f),
new PointF(104.782608f, 1075.13245f),
new PointF(104.782608f, 1075.13245f)
);
}
);
SixLabors.ImageSharp.Formats.Png.PngEncoder pngEncoder = new SixLabors.ImageSharp.Formats.Png.PngEncoder();
pngEncoder.CompressionLevel = 0;
FileStream fileStream = new FileStream(savePath, FileMode.OpenOrCreate);
img.SaveAsPng(fileStream, pngEncoder);
}
}
}
}
System Configuration
Win 10, .NET Core 2.0
ImageSharp version: 1.0.0-beta0006
Other ImageSharp packages and versions:
Environment (Operating system, version and so on):
Ok, it was git pull upstream master. My local build is totally broken though with all the changes, I'll need to look at it closer in the weekend, but my guess is the bug is still there, it's pretty circumstantial.
Activity
JimBobSquarePants commentedon Jun 7, 2019
Hi @woutware Thanks for supplying all the info.
Is the issue still present in the latest development builds from MyGet?
woutware commentedon Jun 7, 2019
My git skills are rusty, I did a Pull in GitHub desktop on the ImageSharp repository, that should get me the latest sources isn't it?
woutware commentedon Jun 7, 2019
Still using https://github.com/woutware/ImageSharp.git that I used last year to build locally.
woutware commentedon Jun 7, 2019
Oh shit that's my own fork. How do I synch it again?
woutware commentedon Jun 7, 2019
Ok, it was
git pull upstream master. My local build is totally broken though with all the changes, I'll need to look at it closer in the weekend, but my guess is the bug is still there, it's pretty circumstantial.101100 commentedon Aug 11, 2019
@woutware This was fixed in #964. I was able to test it in my project using the nightly build
1.0.0-dev002846on MyGet.WIP: #12 Synch with master and improve performance of decoders (#986)
Add test from issue SixLabors#928