Skip to content

Commit

Permalink
fix(storage): Fix WiteableBitmap Buffer usage
Browse files Browse the repository at this point in the history
  • Loading branch information
dr1rrb committed Oct 9, 2020
1 parent 47ed594 commit 4224570
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Uno.UI/UI/Xaml/Media/Imaging/WriteableBitmap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ public partial class WriteableBitmap : BitmapSource

public WriteableBitmap(int pixelWidth, int pixelHeight) : base()
{
_buffer = new UwpBuffer((uint)(pixelWidth * pixelHeight * 4));
var pixelsBufferSize = (uint)(pixelWidth * pixelHeight * 4);
_buffer = new UwpBuffer(pixelsBufferSize)
{
Length = pixelsBufferSize
};

PixelWidth = pixelWidth;
PixelHeight = pixelHeight;
Expand Down

0 comments on commit 4224570

Please sign in to comment.