Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

BitmapDecoder.GetPixelDataAsync() | getPixelDataAsync() method

Applies to Windows and Windows Phone

Asynchronously requests the pixel data for the frame.

Syntax


bitmapDecoder.getPixelDataAsync().done( /* Your success and error handlers */ );

Parameters

This method has no parameters.

Return value

Type: IAsyncOperation<PixelDataProvider>

Object that manages the asynchronous retrieval of the pixel data.

Remarks

The pixel data array will use the bitmap pixel format and alpha mode specified in the BitmapPixelFormat and BitmapAlphaMode properties. It will also have color management and EXIF orientation applied.

An application should not assume that pixel data returned by this method uses any particular pixel format or alpha mode (like Rgba8 with premultiplied alpha). Instead, it should always check the BitmapPixelFormat and BitmapAlphaMode properties and handle the data accordingly.

As a convenience, this method performs color management from the frame’s embedded color space (if it exists) to the sRGB color space. If there is no embedded color profile data, then no color management is performed. This method also attempts to read the EXIF orientation flag on the frame, and if it exists, will perform the necessary transformation to correctly orient the pixel data.

In order to retrieve the correct bitmap pixel width and height, the application should read the OrientedPixelWidth and OrientedPixelHeight properties, instead of the PixelWidth and PixelHeight properties.

This method is equivalent to calling the GetPixelDataAsync(BitmapPixelFormat, BitmapAlphaMode, BitmapTransform, ExifOrientationMode, ColorManagementMode) method with the following arguments:

ArgumentValue
pixelFormatThe value of the BitmapPixelFormat property.
alphaModeThe value of the BitmapAlphaMode property
transformA new BitmapTransform.
exifOrientationModeThe ExifOrientationMode value RespectExifOrientation.
colorManagementModeThe ColorManagementMode value ColorManageToSRgb.

 

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Graphics.Imaging
Windows::Graphics::Imaging [C++]

Metadata

Windows.winmd

See also

How to get pixel data in a particular format (Windows Store apps using C#/VB/C++ and XAML)
How to get pixel data in a particular format (Windows Store apps using JavaScript and HTML)
BitmapDecoder
GetPixelDataAsync(BitmapPixelFormat, BitmapAlphaMode, BitmapTransform, ExifOrientationMode, ColorManagementMode)
PixelDataProvider

 

 

Show:
© 2014 Microsoft