Click or drag to resize
CanvasBitmapSaveAsync Method (IRandomAccessStream, CanvasBitmapFileFormat, Single)
Saves the entire bitmap to the specified stream with the specified file format and quality level.

Namespace:  Microsoft.Graphics.Canvas
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public IAsyncAction SaveAsync(
	IRandomAccessStream stream,
	CanvasBitmapFileFormat fileFormat,
	float quality
)

Parameters

stream
Type: Windows.Storage.StreamsIRandomAccessStream
fileFormat
Type: Microsoft.Graphics.CanvasCanvasBitmapFileFormat
quality
Type: SystemSingle

Return Value

Type: IAsyncAction
Remarks

The stream must be writeable. CanvasBitmapFileFormat.Auto is not allowed with this method.

To save image data using a high dynamic range (HDR) pixel format, use JpegXR format and provide a bitmap using one of the pixel formats:

  • DirectXPixelFormat.R16G16B16A16Float
  • DirectXPixelFormat.R32G32B32A32Float
  • DirectXPixelFormat.R16G16B16A16UIntNormalized
See Also