Quantcast
Channel: WriteableBitmapEx
Viewing all articles
Browse latest Browse all 360

Closed Unassigned: AccessViolationException when drawing long line [20711]

$
0
0
Hello
I have a problem with an AccessViolationException on a long image. Is there a max size for the image?
I have created a small program that shows the problem:
```

private void Window_Loaded(object sender, RoutedEventArgs e)
{
DrawLine(737, 11700); //crashes with AccessViolationException
DrawLine(737, 11000); //renders ok
}

private void DrawLine(int w, int h)
{
var bmp = BitmapFactory.New(w, h);
using (bmp.GetBitmapContext())
{
bmp.DrawLine(0, 0, 0, h-1, Color.FromRgb(0, 0, 0));
}

image1.Source = bmp;
}
```
Comments: Yes, there's a limit with the WriteableBitmap class and you are over it. ;)

Viewing all articles
Browse latest Browse all 360

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>