Corrected formula for calculating total number of bytes
This commit is contained in:
Родитель
abf9f1885e
Коммит
3cf150a0e1
|
@ -165,7 +165,8 @@ namespace SkiaSharp.Views.Android
|
|||
}
|
||||
else
|
||||
{
|
||||
success = skiaBitmap.CopyPixelsTo(ptr, bmp.Width * bmp.RowBytes);
|
||||
// must multiply HEIGHT * rowBytes to get total number of bytes
|
||||
success = skiaBitmap.CopyPixelsTo(ptr, bmp.Height * bmp.RowBytes);
|
||||
}
|
||||
|
||||
bmp.UnlockPixels();
|
||||
|
|
Загрузка…
Ссылка в новой задаче