IBitmapFrame
IBitmapFrame
IBitmapFrame
IBitmapFrame
Interface
Definition
Exposes methods for operating on a single frame of an image.
public : interface IBitmapFramepublic interface IBitmapFramePublic Interface IBitmapFrame// You can use this interface in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Properties
BitmapAlphaMode BitmapAlphaMode BitmapAlphaMode BitmapAlphaMode
Returns the default alpha mode of the frame.
public : BitmapAlphaMode BitmapAlphaMode { get; }public BitmapAlphaMode BitmapAlphaMode { get; }Public ReadOnly Property BitmapAlphaMode As BitmapAlphaMode// You can use this property in JavaScript.
The default alpha mode of the frame.
Remarks
This is the alpha mode used when calling the GetPixelDataAsync method.
BitmapPixelFormat BitmapPixelFormat BitmapPixelFormat BitmapPixelFormat
Returns the default pixel format of the frame.
public : BitmapPixelFormat BitmapPixelFormat { get; }public BitmapPixelFormat BitmapPixelFormat { get; }Public ReadOnly Property BitmapPixelFormat As BitmapPixelFormat// You can use this property in JavaScript.
The default pixel format of the frame.
Remarks
This is the pixel format used when calling the GetPixelDataAsync method.
BitmapProperties BitmapProperties BitmapProperties BitmapProperties
Returns a read-only view of the metadata within the frame.
public : BitmapPropertiesView BitmapProperties { get; }public BitmapPropertiesView BitmapProperties { get; }Public ReadOnly Property BitmapProperties As BitmapPropertiesView// You can use this property in JavaScript.
A read-only view of the metadata within the frame.
DpiX DpiX DpiX DpiX
Returns the horizontal resolution of the frame in dots per inch.
public : double DpiX { get; }public double DpiX { get; }Public ReadOnly Property DpiX As double// You can use this property in JavaScript.
- Value
- double double double double
The horizontal resolution of the frame in dots per inch.
DpiY DpiY DpiY DpiY
Returns the vertical resolution of the frame in dots per inch.
public : double DpiY { get; }public double DpiY { get; }Public ReadOnly Property DpiY As double// You can use this property in JavaScript.
- Value
- double double double double
The vertical resolution of the frame in dots per inch.
OrientedPixelHeight OrientedPixelHeight OrientedPixelHeight OrientedPixelHeight
Returns the height of the frame in pixels, after any EXIF orientation has been applied to the bitmap.
public : unsigned int OrientedPixelHeight { get; }public uint OrientedPixelHeight { get; }Public ReadOnly Property OrientedPixelHeight As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The height of the frame in pixels, after any EXIF orientation has been applied.
OrientedPixelWidth OrientedPixelWidth OrientedPixelWidth OrientedPixelWidth
Returns the width of the frame in pixels, after any EXIF orientation has been applied to the bitmap.
public : unsigned int OrientedPixelWidth { get; }public uint OrientedPixelWidth { get; }Public ReadOnly Property OrientedPixelWidth As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The width of the frame in pixels, after any EXIF orientation has been applied.
PixelHeight PixelHeight PixelHeight PixelHeight
Returns the height of the frame in pixels.
public : unsigned int PixelHeight { get; }public uint PixelHeight { get; }Public ReadOnly Property PixelHeight As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The height of the frame in pixels.
Remarks
This property ignores any EXIF orientation flag value.
PixelWidth PixelWidth PixelWidth PixelWidth
Returns the width of the frame in pixels.
public : unsigned int PixelWidth { get; }public uint PixelWidth { get; }Public ReadOnly Property PixelWidth As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The width of the frame in pixels.
Remarks
This property ignores any EXIF orientation flag value.
Methods
GetPixelDataAsync() GetPixelDataAsync() GetPixelDataAsync() GetPixelDataAsync()
Asynchronously requests the pixel data for the frame. The resulting 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 (see the Remarks section for more information).
public : IAsyncOperation<PixelDataProvider> GetPixelDataAsync()public IAsyncOperation<PixelDataProvider> GetPixelDataAsync()Public Function GetPixelDataAsync() As IAsyncOperation( Of PixelDataProvider )// You can use this method in JavaScript.
Object that manages the asynchronous retrieval of the pixel data.
Remarks
An application should not assume that pixel data returned by this method uses any particular pixel format or alpha mode (i.e. 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:
| Argument | Value |
|---|---|
| pixelFormat | The value of the BitmapPixelFormat property. |
| alphaMode | The value of the BitmapAlphaMode property |
| transform | An empty transform. |
| exifOrientationMode | The ExifOrientationMode value RespectExifOrientation. |
| colorManagementMode | The ColorManagementMode value ColorManageToSRgb. |
- See Also
-
GetPixelDataAsync(BitmapPixelFormat, BitmapAlphaMode, BitmapTransform, ExifOrientationMode, ColorManagementMode)GetPixelDataAsync(BitmapPixelFormat, BitmapAlphaMode, BitmapTransform, ExifOrientationMode, ColorManagementMode)GetPixelDataAsync(BitmapPixelFormat, BitmapAlphaMode, BitmapTransform, ExifOrientationMode, ColorManagementMode)GetPixelDataAsync(BitmapPixelFormat, BitmapAlphaMode, BitmapTransform, ExifOrientationMode, ColorManagementMode)
GetPixelDataAsync(BitmapPixelFormat, BitmapAlphaMode, BitmapTransform, ExifOrientationMode, ColorManagementMode) GetPixelDataAsync(BitmapPixelFormat, BitmapAlphaMode, BitmapTransform, ExifOrientationMode, ColorManagementMode) GetPixelDataAsync(BitmapPixelFormat, BitmapAlphaMode, BitmapTransform, ExifOrientationMode, ColorManagementMode) GetPixelDataAsync(BitmapPixelFormat, BitmapAlphaMode, BitmapTransform, ExifOrientationMode, ColorManagementMode)
Asynchronously requests the pixel data for the frame using the specified parameters.
public : IAsyncOperation<PixelDataProvider> GetPixelDataAsync(BitmapPixelFormat pixelFormat, BitmapAlphaMode alphaMode, BitmapTransform transform, ExifOrientationMode exifOrientationMode, ColorManagementMode colorManagementMode)public IAsyncOperation<PixelDataProvider> GetPixelDataAsync(BitmapPixelFormat pixelFormat, BitmapAlphaMode alphaMode, BitmapTransform transform, ExifOrientationMode exifOrientationMode, ColorManagementMode colorManagementMode)Public Function GetPixelDataAsync(pixelFormat As BitmapPixelFormat, alphaMode As BitmapAlphaMode, transform As BitmapTransform, exifOrientationMode As ExifOrientationMode, colorManagementMode As ColorManagementMode) As IAsyncOperation( Of PixelDataProvider )// You can use this method in JavaScript.
The specified pixel format.
The specified alpha mode.
The set of transformations to be applied to the frame.
- exifOrientationMode
- ExifOrientationMode ExifOrientationMode ExifOrientationMode ExifOrientationMode
Indicates whether the EXIF orientation flag should be ignored or respected.
- colorManagementMode
- ColorManagementMode ColorManagementMode ColorManagementMode ColorManagementMode
Indicates whether the pixel data should be color managed to the sRGB color space.
Object that manages the asynchronous retrieval of the pixel data.
Remarks
This method should be used instead of GetPixelDataAsync if the application needs finer grained control over the pixel data array.
- See Also
GetThumbnailAsync() GetThumbnailAsync() GetThumbnailAsync() GetThumbnailAsync()
Asynchronously retrieves the thumbnail data for the frame.
public : IAsyncOperation<ImageStream> GetThumbnailAsync()public IAsyncOperation<ImageStream> GetThumbnailAsync()Public Function GetThumbnailAsync() As IAsyncOperation( Of ImageStream )// You can use this method in JavaScript.
Object that manages the asynchronous retrieval of the thumbnail data.