bitmapencoder

The buffer allocated is insufficient when encoding to Rgba16 UWP

血红的双手。 提交于 2019-12-12 02:39:05
问题 I am encoding a Canvas control which contains Textblocks as child using the following code but I get The buffer allocated is insufficient My code using(InMemoryRandomAccessStream ras = new InMemoryRandomAccessStream()) { var displayInformation = DisplayInformation.GetForCurrentView(); var renderTargetBitmap = new RenderTargetBitmap(); await renderTargetBitmap.RenderAsync(Textify.CanvasControl); var width = renderTargetBitmap.PixelWidth; var height = renderTargetBitmap.PixelHeight; IBuffer