Android Guides | Samples

Android.Graphics.Bitmap.RowBytes Property

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

Syntax

[get: Android.Runtime.Register("getRowBytes", "()I", "GetGetRowBytesHandler")]
public Int32 RowBytes { get; }

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 Build+VERSION_CODES.KitKat, this method should not be used to calculate the memory usage of the bitmap. Instead, see Bitmap.AllocationByteCount.

[Android Documentation]

Requirements

Namespace: Android.Graphics
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1