title: How to convert a byte array to SKBitmap in SkiaSharp?
body: <p>SKBitmap.Bytes is read only, any suggestion on how to Marshal.Copy a byte array to the SKBitmap? I am using below code snippet but it not working.</p>
  <p>Code snippet:</p>
  <pre><code>    SKBitmap bitmap = new SKBitmap((int)Width, (int)Height);
      bitmap.LockPixels();
      byte[] array = new byte[bitmap.RowBytes * bitmap.Height];
      for (int i = 0; i &lt; pixelArray.Length; i++)
      {
          SKColor color = new SKColor((uint)pixelArray[i]);
          int num = i % (int)Width;
          int num2 = i / (int)Width;
          array[bitmap.RowBytes * num2 + 4 * num] = color.Blue;
          array[bitmap.RowBytes * num2 + 4 * num + 1] = color.Green;
          array[bitmap.RowBytes * num2 + 4 * num + 2] = color.Red;
          array[bitmap.RowBytes * num2 + 4 * num + 3] = color.Alpha;
      }
      Marshal.Copy(array, 0, bitmap.Handle, array.Length);
      bitmap.UnlockPixels();
  </code></pre>