Android Guides | Samples

Android.Graphics.Bitmap.AllocationByteCount Property

Returns the size of the allocated memory used to store this bitmap's pixels.

Syntax

[get: Android.Runtime.Register("getAllocationByteCount", "()I", "GetGetAllocationByteCountHandler")]
public Int32 AllocationByteCount { get; }

See Also

Remarks

Returns the size of the allocated memory used to store this bitmap's pixels.

This can be larger than the result of Bitmap.ByteCount if a bitmap is reused to decode other bitmaps of smaller size, or by manual reconfiguration. See Bitmap.Reconfigure(Int32,Int32,Int32), Bitmap.Width, Bitmap.Height, Bitmap.SetConfig(.Config), and NoType:android/graphics/BitmapFactory$Options;Href=../../../reference/android/graphics/BitmapFactory.Options.html#inBitmap. If a bitmap is not modified in this way, this value will be the same as that returned by Bitmap.ByteCount.

This value will not change over the lifetime of a Bitmap.

[Android Documentation]

Requirements

Namespace: Android.Graphics
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0