I have the same problem. Seems to be related to 8bit png's. Because 32 bit works fine.
Have you found any solution to this problem?
Thanks.
This is solved incorrectly.
See https://github.com/teichgraf/WriteableBitmapEx/issues/5
As it is now it is never possible to fill the right side or the bottom side of the bitmap.
It would be better to change the parameters of FillRectangle from x1,y1,x2,y2 to x,y,width,height.
Thanks for pointing this out. Can you also repro it with a different size like 1738 x 3856?
Also, it would be helpful and increase the chance of a faster resolve if you attach a sample sln.
I've reproduced it with the following parameter / call:
DrawLineAa(WriteableBitmap(W:2000 x H:1324), 304, 1324, 225, 1324, #FF0000FF, 5)
I see that the y1, y2 are outside the bitmap. However, I expect the line to be properly clipped
or as the second best solution an informative exception to be thrown.
Without source code I was only guessing and never came behind the cause.
```
Method AADrawLine()
{
...
if (y1 == y2)
{
...
// x = 225
// y = 1324
// w = 2000
// buffer.Length = 2648000
// y * width + x = 2648225
// it looks like it goes one line down outside of the bitmap
d = buffer[y * width + x]; // crash here
}
}
```
WriteableBitmap writeableBitmap = BitmapFactory.New(500, 500);
writeableBitmap.DrawLinePenned(10, 10, 50, 50, ?);
<runtime>
<gcAllowVeryLargeObjects enabled="true" />
</runtime>
into your App.config will help depending on what exactly you're doing. Basically on 64-bit platforms, enables arrays that are greater than 2 gigabytes (GB) in total size, which may solve certain issues (it did with me but that was because I was using arrays along with WriteableBitmapEx). No, I was not. I basically gave up on using WriteableBitmapEx class.
Thanks,
From: Scusemua
Were you ever able to find fixes for the memory stuff?
I believe this is .NET 4.5 and up only, but puttinginto your App.config will help depending on what exactly you're doing. Basically on 64-bit platforms, enables arrays that are greater than 2 gigabytes (GB) in total size, which may solve certain issues (it did with me but that was because I was using arrays along with WriteableBitmapEx).<runtime><gcAllowVeryLargeObjects enabled="true" /></runtime>