Bitmap.WrapHardwareBuffer(HardwareBuffer, ColorSpace) Method

Definition

Create a hardware bitmap backed by a HardwareBuffer.

[Android.Runtime.Register("wrapHardwareBuffer", "(Landroid/hardware/HardwareBuffer;Landroid/graphics/ColorSpace;)Landroid/graphics/Bitmap;", "", ApiSince=29)]
public static Android.Graphics.Bitmap? WrapHardwareBuffer (Android.Hardware.HardwareBuffer hardwareBuffer, Android.Graphics.ColorSpace? colorSpace);
[<Android.Runtime.Register("wrapHardwareBuffer", "(Landroid/hardware/HardwareBuffer;Landroid/graphics/ColorSpace;)Landroid/graphics/Bitmap;", "", ApiSince=29)>]
static member WrapHardwareBuffer : Android.Hardware.HardwareBuffer * Android.Graphics.ColorSpace -> Android.Graphics.Bitmap

Parameters

hardwareBuffer
HardwareBuffer

The HardwareBuffer to wrap.

colorSpace
ColorSpace

The color space of the bitmap. Must be a ColorSpace.Rgb colorspace. If null, SRGB is assumed.

Returns

Bitmap

A bitmap wrapping the buffer, or null if there was a problem creating the bitmap.

Attributes

Remarks

Java documentation for android.graphics.Bitmap.wrapHardwareBuffer(android.hardware.HardwareBuffer, android.graphics.ColorSpace).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to