Freigeben über


Bitmap.RowBytes Property

Definition

Return the number of bytes between rows in the bitmap's pixels.

public int RowBytes { [Android.Runtime.Register("getRowBytes", "()I", "")] get; }
[<get: Android.Runtime.Register("getRowBytes", "()I", "")>]
member this.RowBytes : int

Property Value

number of bytes between rows of the native bitmap pixels.

Attributes

Remarks

Return the number of bytes between rows in the bitmap's pixels. Note that this refers to the pixels as stored natively by the bitmap. If you call getPixels() or setPixels(), then the pixels are uniformly treated as 32bit values, packed according to the Color class.

As of android.os.Build.VERSION_CODES#KITKAT, this method should not be used to calculate the memory usage of the bitmap. Instead, see #getAllocationByteCount().

Java documentation for android.graphics.Bitmap.getRowBytes().

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