SkiaSharp.Views.Forms in android error: Bitmap too large to be uploaded

first code:
private void CanvasView_PaintSurface(object sender, SKPaintSurfaceEventArgs e)
{
....
SKCanvas canvas = e.Surface.Canvas;
canvas.Clear();
canvas.DrawRoundRect(xxxxx)
}

and i try using skbitmap.decode:
private void CanvasView_PaintSurface(object sender, SKPaintSurfaceEventArgs e)
{
....
var bitmap = new SKBitmap(e.Info);
SKCanvas canvas =new SKCanvas(bitmap);
canvas.Clear(SKColors.Transparent);
canvas.DrawRoundRect(xxxxx);
e.Surface.Canvas.DrawBitmap(SKBitmap.Decode(Image2Byte(bitmap)), 0, 0);
}

display same error:
Bitmap too large to be uploaded into a texture (1081x5371, max=4096x4096)

how can i fix this error.
tks

Sign In or Register to comment.