次の方法で共有


TextureView.Bitmap Property

Definition

Returns a android.graphics.Bitmap representation of the content of the associated surface texture.

public virtual Android.Graphics.Bitmap? Bitmap { [Android.Runtime.Register("getBitmap", "()Landroid/graphics/Bitmap;", "GetGetBitmapHandler")] get; }
[<get: Android.Runtime.Register("getBitmap", "()Landroid/graphics/Bitmap;", "GetGetBitmapHandler")>]
member this.Bitmap : Android.Graphics.Bitmap

Property Value

A valid Bitmap.Config#ARGB_8888 bitmap, or null if the surface texture is not available or the width &lt;= 0 or the height &lt;= 0

Attributes

Remarks

Returns a android.graphics.Bitmap representation of the content of the associated surface texture. If the surface texture is not available, this method returns null.

The bitmap returned by this method uses the Bitmap.Config#ARGB_8888 pixel format and its dimensions are the same as this view's.

<strong>Do not</strong> invoke this method from a drawing method (#onDraw(android.graphics.Canvas) for instance).

If an error occurs during the copy, an empty bitmap will be returned.

Java documentation for android.view.TextureView.getBitmap().

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

See also